polysemy-conc-0.12.1.0: Polysemy effects for concurrency
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Conc.Interpreter.Lock

Description

Lock interpreters, Internal

Synopsis

Documentation

interpretLockPermissive :: InterpreterFor Lock r Source #

Interpret Lock by executing all actions unconditionally.

interpretLockReentrantEntered :: Members [Sync (), Resource, Race, Mask, Embed IO] r => ThreadId -> InterpreterFor Lock r Source #

Subinterpreter for interpretLockReentrant that checks whether the current thread is equal to the lock-acquiring thread to allow reentry into the lock.

interpretLockReentrant :: Members [Resource, Race, Mask, Embed IO] r => InterpreterFor Lock r Source #

Interpret Lock as a reentrant lock, allowing nested calls to lock unless called from a different thread (as in, async was called in a higher-order action passed to lock.)