Idris2Doc : System.Concurrency

System.Concurrency

Barrier : Type
A barrier enables multiple threads to synchronize the beginning of some
computation.
Totality: total
Channel : Type -> Type
Totality: total
Condition : Type
Totality: total
Mutex : Type
Totality: total
Semaphore : Type
Totality: total
barrierWait : HasIOio => Barrier -> ioUnit
Blocks the current thread until all threads have rendezvoused here.
channelGet : HasIOio => Channela -> ioa
Blocks until a sender is ready to provide a value through `chan`. The result
is the sent value.
channelPut : HasIOio => Channela -> a -> ioUnit
Blocks until a receiver is ready to accept the value `val` through `chan`.
conditionBroadcast : HasIOio => Condition -> ioUnit
Releases all of the threads waiting for the condition identified by `cond`.
conditionSignal : HasIOio => Condition -> ioUnit
Releases one of the threads waiting for the condition identified by `cond`.
conditionWait : HasIOio => Condition -> Mutex -> ioUnit
Waits up to the specified timeout for the condition identified by the
condition variable `cond`. The calling thread must have acquired the mutex
identified by `mutex` at the time `conditionWait` is called. The mutex is
released as a side effect of the call to `conditionWait`. When a thread is
later released from the condition variable by one of the procedures
described below, the mutex is reacquired and `conditionWait` returns.
conditionWaitTimeout : HasIOio => Condition -> Mutex -> Int -> ioUnit
Variant of `conditionWait` with a timeout in microseconds.
When the timeout expires, the thread is released, `mutex` is reacquired, and
`conditionWaitTimeout` returns.
getThreadData : HasIOio => (a : Type) -> ioa
makeBarrier : HasIOio => Int -> ioBarrier
Creates a new barrier that can block a given number of threads.
makeChannel : HasIOio => io (Channela)
Creates and returns a new channel. The channel can be used with channelGet
to receive a value through the channel. The channel can be used with
channelPut to send a value through the channel.
makeCondition : HasIOio => ioCondition
Creates and returns a new condition variable.
makeMutex : HasIOio => ioMutex
Creates and returns a new mutex.
makeSemaphore : HasIOio => Int -> ioSemaphore
Creates and returns a new semaphore with the counter initially set to `init`.
mutexAcquire : HasIOio => Mutex -> ioUnit
Acquires the mutex identified by `mutex`. The thread blocks until the mutex
has been acquired.

Mutexes are recursive in Posix threads terminology, which means that the
calling thread can use mutex-acquire to (re)acquire a mutex it already has.
In this case, an equal number of mutex-release calls is necessary to release
the mutex.
mutexRelease : HasIOio => Mutex -> ioUnit
Releases the mutex identified by `mutex`. Unpredictable behavior results if
the mutex is not owned by the calling thread.
semaphorePost : HasIOio => Semaphore -> ioUnit
Increments the semaphore's internal counter.
semaphoreWait : HasIOio => Semaphore -> ioUnit
Blocks until the internal counter for semaphore sema is non-zero. When the
counter is non-zero, it is decremented and `semaphoreWait` returns.
setThreadData : HasIOio => a -> ioUnit