Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jvoegele/wait_for_it
Elixir library for waiting for things to happen
https://github.com/jvoegele/wait_for_it
Last synced: 2 months ago
JSON representation
Elixir library for waiting for things to happen
- Host: GitHub
- URL: https://github.com/jvoegele/wait_for_it
- Owner: jvoegele
- License: apache-2.0
- Created: 2017-08-24T19:24:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-15T12:55:28.000Z (about 1 year ago)
- Last Synced: 2024-09-26T01:37:44.426Z (4 months ago)
- Language: Elixir
- Homepage:
- Size: 108 KB
- Stars: 15
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Provides convenient and easy-to-use facilities for synchronizing concurrent activities. (Eventhandling)
- fucking-awesome-elixir - wait_for_it - Provides convenient and easy-to-use facilities for synchronizing concurrent activities. (Eventhandling)
- awesome-elixir - wait_for_it - Provides convenient and easy-to-use facilities for synchronizing concurrent activities. (Eventhandling)
README
# 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:
1. The `wait` macro waits until a given expression evaluates to a truthy value.
2. The `case_wait` macro waits until a given expression evaluates to a value that
matches any one of the given case clauses (looks like an Elixir `case` expression).
3. The `cond_wait` macro waits until any one of the given expressions evaluates to a truthy
value (looks like an Elixir `cond` expression).See the [API reference](https://hexdocs.pm/wait_for_it/WaitForIt.html) for full documentation.
## Installation
`wait_for_it` can be installed by adding it to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:wait_for_it, "~> 2.1"}
]
end
```Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/wait_for_it](https://hexdocs.pm/wait_for_it).