liblawless-0.25.0: Prelude based on protolude for GHC 8 and beyond.

Copyright© 2017 All rights reserved.
LicenseGPL-3
MaintainerEvan Cofsky <evan@theunixman.com>
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

STM.Flag

Description

 

Synopsis

Documentation

newtype Flag Source #

A Flag used for mutexes.

Constructors

Flag TSem 

newFlag :: MonadBase IO m => m Flag Source #

Creates a new Flag in the held state.

waitFlag :: Flag -> STM () Source #

Waits for a Flag to be unheld.

lowerFlag :: Flag -> STM () Source #

Signals a Flag has been released.

run :: MonadBaseControl IO m => m a -> m (Async (StM m a)) Source #

Runs f in a new Async, waiting for the Async to start before continuing.