Std.Concurrent
11 public declarations
- ConcurrentError
Why a thread could not be started, or what it said when it failed.
- forEachBounded
&Array[T] -> Int -> fn(T) -> () -> Result[(), Std.Concurrent.ConcurrentError]Apply an action to values with bounded concurrency, without implicit retries.
- join
&Std.Concurrent.Task -> Result[(), Std.Concurrent.ConcurrentError]Wait for a thread to finish, and report what it said if it failed.
- joinAll
&Array[Std.Concurrent.Task] -> Result[(), Std.Concurrent.ConcurrentError]Wait for every thread, in the order they were started.
- mapBounded
&Array[T] -> Int -> fn(T) -> U -> Result[Array[U], Std.Concurrent.ConcurrentError]Map values with bounded concurrency, preserving input order and typed failures.
- mapResultBounded
&Array[T] -> Int -> fn(T) -> Result[U, E] -> Result[Result[Array[U], E], Std.Concurrent.ConcurrentError]Apply a fallible transform with bounded concurrency, returning the first error in input order.
- parallel
&Array[fn() -> ()] -> Result[(), Std.Concurrent.ConcurrentError]Run every action at once and wait for all of them.
- parallelBounded
&Array[fn() -> ()] -> Int -> Result[(), Std.Concurrent.ConcurrentError]Run a batch with bounded workers; each action is claimed at most once.
- sleep
Int -> Result[(), Std.Concurrent.ConcurrentError]Wait, without holding the machine while waiting.
- start
fn() -> () -> Result[Std.Concurrent.Task, Std.Concurrent.ConcurrentError]Start an action on a thread of its own.
- Task
A thread the program started.
