Safe Haskell | None |
---|---|
Language | Haskell2010 |
plugs box continuations
Synopsis
- commitPlug :: (Emitter STM a -> IO ()) -> Cont IO (Committer STM a)
- emitPlug :: (Committer STM a -> IO r) -> Cont IO (Emitter STM a)
- emitPlugM :: (Committer IO a -> IO r) -> Cont IO (Emitter IO a)
- boxPlug :: (Emitter STM a -> IO ()) -> (Committer STM b -> IO ()) -> Cont IO (Box STM a b)
- boxForgetPlug :: (Box STM b a -> IO ()) -> Cont IO (Box STM a b)
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