Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Promise s a
- newEmptyPromise :: MonadPar d i s m => m (Promise s a)
- newPromise :: a -> Promise s a
- readPromise :: Promise s a -> a
- writePromise :: (MonadPar d i s m, Eq a) => Promise s a -> a -> m ()
Documentation
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.