Idris2Doc : IO.Async.MVar

IO.Async.MVar

(source)

Definitions

recordMVar : Type->Type
  A thread-safe mutable variable.

This comes with several atomic operations: `readMVar`,
`writeMVar`, `modifyMVar`, and `evalState`.

"Atomic" in this context means, that during such an operation,
no other thread will be able to access the mutable variable.

This uses a `System.Concurrency.Mutex` internally, so it will only
be available on the Scheme backends.

Totality: total
Visibility: export
Constructor: 
MV : IORefa->Mutex->MVara

Projections:
.lock : MVara->Mutex
.ref : MVara->IORefa
newMVar : a->IO (MVara)
  Create a new mutable variable.

Totality: total
Visibility: export
readMVar : MVara->IOa
  Atomically read the value from a mutable variable.

Totality: total
Visibility: export
writeMVar : MVara->a->IO ()
  Atomically write a value into a mutable variable.

Totality: total
Visibility: export
modifyMVar : MVara-> (a->a) ->IO ()
  Atomically modify the value in a mutable variable.

Totality: total
Visibility: export
evalState : MVara-> (a-> (a, b)) ->IOb
  Atomically modify and extract the value from a
mutable variable.

Totality: total
Visibility: export
recordMQueue : Type->Type
Totality: total
Visibility: export
Constructor: 
MQ : MVar (Queuea) ->MQueuea

Projection: 
.var : MQueuea->MVar (Queuea)
newMQueue : IO (MQueuea)
Totality: total
Visibility: export
enqueue : MQueuea->a->IO ()
Totality: total
Visibility: export
dequeue : MQueuea->IO (Maybea)
Totality: total
Visibility: export