transient-0.7.0.0: composing programs with multithreading, events and distributed computing

Safe HaskellNone
LanguageHaskell2010

Transient.Mailboxes

Synopsis

Documentation

putMailbox :: Typeable val => val -> TransIO () Source #

write to the mailbox Mailboxes are node-wide, for all processes that share the same connection data, that is, are under the same listen or connect while EVars are only visible by the process that initialized it and his children. Internally, the mailbox is in a well known EVar stored by listen in the Connection state.

putMailbox' :: (Typeable key, Ord key, Typeable val) => key -> val -> TransIO () Source #

write to a mailbox identified by an identifier besides the type

getMailbox :: Typeable val => TransIO val Source #

get messages from the mailbox that matches with the type expected. The order of reading is defined by readTChan This is reactive. it means that each new message trigger the execution of the continuation each message wake up all the getMailbox computations waiting for it.

getMailbox' :: (Typeable key, Ord key, Typeable val) => key -> TransIO val Source #

read from a mailbox identified by an identifier besides the type

deleteMailbox :: Typeable a => a -> TransIO () Source #

delete all subscriptions for that mailbox expecting this kind of data

deleteMailbox' :: (Typeable key, Ord key, Typeable a) => key -> a -> TransIO () Source #

clean a mailbox identified by an Int and the type