Results for “Std.Concurrent.Coordinate.semaphore”
6 matching declarations
Use module:Std.List, kind:fn, or is:exact. Put a Pudu type after ::.
- Std.Concurrent.Coordinate.Semaphore
A count of permits. The free ones wait in
permits;outcounts those - Std.Concurrent.Coordinate.semaphore
Int -> Std.Concurrent.Coordinate.SemaphoreA semaphore holding
countpermits; a count below one is taken as one. - Std.Concurrent.Coordinate.acquire
&Std.Concurrent.Coordinate.Semaphore -> Result[(), Std.Concurrent.Coordinate.CoordinateError]Take a permit, waiting until one is free.
- Std.Concurrent.Coordinate.available
&Std.Concurrent.Coordinate.Semaphore -> Result[Int, Std.Concurrent.Coordinate.CoordinateError]How many permits are free right now.
- Std.Concurrent.Coordinate.release
&Std.Concurrent.Coordinate.Semaphore -> Result[(), Std.Concurrent.Coordinate.CoordinateError]Return a permit. Answers
Overreleasedwhen no permit is out. - Std.Concurrent.Coordinate.withPermit
&Std.Concurrent.Coordinate.Semaphore -> fn() -> T -> Result[T, Std.Concurrent.Coordinate.CoordinateError]Run an action holding a permit. The action runs on a thread of its own,
