task_limiter

Functions

pub fn async_await(
  work: List(fn() -> a),
  num: Int,
  interval: Int,
) -> List(Result(a, AwaitError))

Run a set of functions asynchronously as OTP task num at a time, then waits for the value computed by the tasks to return. Every interval milliseconds the running jobs are checked to see if they have completed and new jobs from the queue are started.

Note: The values are returned in an arbitrary order.

Search Document