Std.Sync
16 public declarations
- cell
T -> Std.Sync.Cell[T]A cell holding a value.
- Cell
A value more than one thread may read and replace.
- count
&Std.Sync.Counter -> Result[Int, Std.Sync.SyncError]What a counter holds.
- counter
Int -> Std.Sync.CounterA counter starting at a value.
- Counter
A number more than one thread may add to without losing an addition.
- Counter
Std.App.Metrics.KindA number more than one thread may add to without losing an addition.
- get
&Std.Sync.Cell[T] -> Result[T, Std.Sync.SyncError]What a cell holds.
- increment
&Std.Sync.Counter -> Int -> Result[Int, Std.Sync.SyncError]Add to a counter and answer what it then holds.
- lock
&Std.Sync.Mutex -> Result[(), Std.Sync.SyncError]Take a lock, waiting until it is free.
- mutex
Std.Sync.MutexA new lock, not held.
- Mutex
A lock, held by at most one thread at a time.
- set
&Std.Sync.Cell[T] -> T -> Result[(), Std.Sync.SyncError]Replace what a cell holds, discarding what it held.
- swap
&Std.Sync.Cell[T] -> T -> Result[T, Std.Sync.SyncError]Replace what a cell holds and answer what it held, in one step nothing can
- SyncError
Why a shared value could not be reached.
- unlock
&Std.Sync.Mutex -> Result[(), Std.Sync.SyncError]Release a lock.
- withLock
&Std.Sync.Mutex -> fn() -> T -> Result[T, Std.Sync.SyncError]Run an action with a lock held, and release it after the action returns.
