Data.Mutex
Description
A trivial mutex.
data Mutex Source #
Constructors
newMutex :: Fay Mutex Source #
Make a new unlocked mutex.
ifMutexFree :: Mutex -> Fay () -> Fay () Source #
If a mutex is free run the action, otherwise don't.
whenMutexFree :: Mutex -> Fay () -> Fay () Source #
Wait until the mutex is free to do something.
lockMutex :: Mutex -> (Fay () -> Fay a) -> Fay a Source #
Lock the given mutex until I'm done with it.