Safe Haskell | None |
---|---|
Language | Haskell2010 |
Thread safe queues for message passing between many concurrent processes.
This message box is UNLIMITED.
Good single producer/single consumer performance
If you are sure that the producer(s) send messages at a lower rate than the rate at which the consumer consumes messages, use this module.
Otherwise use the more conservative UnliftIO.MessageBox.Limited module.
Synopsis
- data BlockingUnlimited = BlockingUnlimited
- data UnlimitedBox a
- data UnlimitedBoxInput a
Documentation
data BlockingUnlimited Source #
The (empty) configuration for creating
UnlimitedBox
es using the IsMessageBoxArg
methods.
Instances
Show BlockingUnlimited Source # | |
Defined in UnliftIO.MessageBox.Unlimited showsPrec :: Int -> BlockingUnlimited -> ShowS # show :: BlockingUnlimited -> String # showList :: [BlockingUnlimited] -> ShowS # | |
IsMessageBoxArg BlockingUnlimited Source # | |
Defined in UnliftIO.MessageBox.Unlimited type MessageBox BlockingUnlimited :: Type -> Type Source # getConfiguredMessageLimit :: BlockingUnlimited -> Maybe Int Source # newMessageBox :: MonadUnliftIO m => BlockingUnlimited -> m (MessageBox BlockingUnlimited a) Source # | |
type MessageBox BlockingUnlimited Source # | |
Defined in UnliftIO.MessageBox.Unlimited |
data UnlimitedBox a Source #
A message queue out of which messages can
by receive
d.
This is the counter part of Input
. Can be
used for reading messages.
Messages can be received by receive
or tryReceive
.
Instances
IsMessageBox UnlimitedBox Source # | A blocking instance that invokes |
Defined in UnliftIO.MessageBox.Unlimited receive :: MonadUnliftIO m => UnlimitedBox a -> m (Maybe a) Source # tryReceive :: MonadUnliftIO m => UnlimitedBox a -> m (Future a) Source # receiveAfter :: MonadUnliftIO m => UnlimitedBox a -> Int -> m (Maybe a) Source # newInput :: MonadUnliftIO m => UnlimitedBox a -> m (Input UnlimitedBox a) Source # | |
type Input UnlimitedBox Source # | |
Defined in UnliftIO.MessageBox.Unlimited |
data UnlimitedBoxInput a Source #
A message queue into which messages can be enqued by,
e.g. deliver
.
Messages can be received from an UnlimitedBox
.
The UnlimitedBoxInput
is the counter part of a UnlimitedBox
.
Instances
IsInput UnlimitedBoxInput Source # | A blocking instance that invokes |
Defined in UnliftIO.MessageBox.Unlimited deliver :: MonadUnliftIO m => UnlimitedBoxInput a -> a -> m Bool Source # deliver_ :: MonadUnliftIO m => UnlimitedBoxInput a -> a -> m () Source # |