unliftio-messagebox-2.0.0: Fast and robust message queues for concurrent processes
Safe HaskellNone
LanguageHaskell2010

UnliftIO.MessageBox.Util.Future

Synopsis

Documentation

newtype Future a Source #

A wrapper around an IO action that returns value in the future.

Constructors

Future (IO (Maybe a)) 

tryNow :: MonadUnliftIO m => Future a -> m (Maybe a) Source #

Return Just the value or Nothing, when the value is not available yet.

Once the value is available, that value will be returned everytime this function is invoked.

awaitFuture :: MonadUnliftIO m => Future b -> m b Source #

Poll a Future until the value is present.