concurrent-0

Safe HaskellNone
LanguageHaskell2010

Concurrent.Promise

Synopsis

Documentation

data Promise s a Source

An Promise can be fulfilled multiple times, but must be always be fulfilled with the same answer.

newEmptyPromise :: MonadPar d i s m => m (Promise s a) Source

newPromise :: a -> Promise s a Source

Build a filled Promise out of a known value

readPromise :: Promise s a -> a Source

Fulfilling the promise is tied to the region parameter, but reading the value is not.

writePromise :: (MonadPar d i s m, Eq a) => Promise s a -> a -> m () Source

This would be valid under SafeHaskell in the presence of sound Eq instances.