- taking : Std.Condvar
- putting : Std.Condvar
Instances For
Equations
- Concurrency.MVar.new value = Concurrency.MVar.mk✝ <$> Std.Condvar.new <*> Std.Condvar.new <*> Std.Mutex.new (Concurrency.MVar.State.full value)
Instances For
Equations
Instances For
def
Concurrency.MVar.isEmpty
{a : Type}
{m : Type → Type u_1}
[Monad m]
[MonadState (State a) m]
:
m Bool
Instances For
def
Concurrency.MVar.isFull
{a : Type}
{m : Type → Type u_1}
[Monad m]
[MonadState (State a) m]
:
m Bool
Instances For
Returns the content of the MVar. If the MVar is currently empty, take will wait until it is fill. After a take, the MVar is left empty.
Single-wakeup LIFO order
Equations
- One or more equations did not get rendered due to their size.
Instances For
Put a value into the MVar. If the MVar is currently full, put will wait until it becomes empty.
Single-wakeup FIFO order
Equations
- self.put value = self.state.atomicallyOnce self.putting Concurrency.MVar.isEmpty do set (Concurrency.MVar.State.full value) liftM self.taking.notifyOne