box-0.0.1.5: boxes

Safe HaskellNone
LanguageHaskell2010

Box.Plugs

Description

plugs box continuations

Synopsis

Documentation

commitPlug :: (Emitter STM a -> IO ()) -> Cont IO (Committer STM a) Source #

hook an emitter action to a queue, creating a committer continuation

emitPlug :: (Committer STM a -> IO r) -> Cont IO (Emitter STM a) Source #

hook a committer action to a queue, creating an emitter continuation

emitPlugM :: (Committer IO a -> IO r) -> Cont IO (Emitter IO a) Source #

hook a committer action to a queue, creating an emitter continuation

boxPlug :: (Emitter STM a -> IO ()) -> (Committer STM b -> IO ()) -> Cont IO (Box STM a b) Source #

create a double-queued box plug

boxForgetPlug :: (Box STM b a -> IO ()) -> Cont IO (Box STM a b) Source #

create a box plug from a box action. Caution: implicitly, this (has to) forget interactions between emitter and committer in the one action (and it does so silently). These forgotten interactions are typically those that create races