WaitForIt
Various ways of waiting for things to happen.
This library allows you to wait on the results of asynchronous or remote operations using intuitive and familiar syntax based on built-in Elixir language constructs.
There are three distinct forms of waiting provided:
-
The
waitmacro waits until a given expression evaluates to a truthy value. -
The
case_waitmacro waits until a given expression evaluates to a value that matches any one of the given case clauses (looks like an Elixircaseexpression). -
The
cond_waitmacro waits until any one of the given expressions evaluates to a truthy value (looks like an Elixircondexpression).
See the API reference for full documentation.
Installation
wait_for_it can be installed by adding it to your list of dependencies in mix.exs:
def deps do
[
{:wait_for_it, "~> 2.1"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/wait_for_it.