Handy functions for rate limiting, polling, and receiving.
- Rate Limiting:
limit_rate/2enforces a configurable token bucket rate limit. - Polling:
poll/1,poll!/1, andpoll_once/1periodically check that a given condition has been met. - Receiving:
receive_next/2andreceive_next!/2return the next message/s from the mailbox within a timeout.
Hexdocs found at https://hexdocs.pm/ex_waiter.
Add the latest release to your mix.exs file:
defp deps do
[
{:ex_waiter, "~> 1.3.1"}
]
endThen run mix deps.get in your shell to fetch the dependencies.
The API for this library has not yet fully stabilized.
Thanks to @itsgreggreg and @s3cur3, for providing helpful feedback.