Module
Effect.AVar
- Package
- purescript-avar
- Repository
- purescript-contrib/purescript-avar
#take Source
take :: forall a. AVar a -> AVarCallback a -> Effect (Effect Unit)
Takes the AVar value, leaving it empty. If the AVar is already empty, the callback will be queued until the AVar is filled. Multiple takes will resolve in order as the AVar fills. Returns an effect which will remove the callback from the pending queue.
#put Source
put :: forall a. a -> AVar a -> AVarCallback Unit -> Effect (Effect Unit)
Sets the value of the AVar. If the AVar is already filled, it will be queued until the value is emptied. Multiple puts will resolve in order as the AVar becomes available. Returns an effect which will remove the callback from the pending queue.
#status Source
status :: forall a. AVar a -> Effect (AVarStatus a)
Synchronously checks the status of an AVar.
#isEmpty Source
isEmpty :: forall a. AVarStatus a -> Boolean
#isFilled Source
isFilled :: forall a. AVarStatus a -> Boolean
#isKilled Source
isKilled :: forall a. AVarStatus a -> Boolean
- Modules
- Effect.
AVar - Effect.
Aff. AVar