Safe Haskell | Unsafe |
---|
This module exports LabeledResult
s which are effectively thread exit
results protected by a label. See LIO.Concurrent for a description
of the concurrency abstractions of LIO.
- data LabeledResult l a = LabeledResultTCB {
- lresThreadIdTCB :: !ThreadId
- lresLabelTCB :: !l
- lresBlockTCB :: !(MVar ())
- lresStatusTCB :: !(IORef (LResStatus l a))
- data LResStatus l a
- = LResEmpty
- | LResLabelTooHigh !l
- | LResResult a
Documentation
data LabeledResult l a Source
A LabeledResult encapsulates a future result from a computation running
in a thread. It holds the ThreadId
and an LMVar
where the result is
stored. The thread referenced in lresThreadIdTCB
should fill in
lresResultTCB
(either with a value or exception), so waiting on the thread
should ensure that a result is ready.
LabeledResultTCB | |
|
data LResStatus l a Source
(Show l, Show a) => Show (LResStatus l a) |