| Safe Haskell | Unsafe |
|---|
LIO.TCB.Concurrent
Description
This module exports LabeledResults 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.
Constructors
| LabeledResultTCB | |
Fields
| |
Instances
data LResStatus l a Source
Constructors
| LResEmpty | |
| LResLabelTooHigh !l | |
| LResResult a |
Instances
| (Show l, Show a) => Show (LResStatus l a) |