lio-0.10.0.0: Labeled IO Information Flow Control Library

Safe HaskellUnsafe

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.

Synopsis

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

lresThreadIdTCB :: !ThreadId

Thread executing the computation

lresLabelTCB :: !l

Label of the tresult

lresBlockTCB :: !(MVar ())
 
lresStatusTCB :: !(IORef (LResStatus l a))

Result (when it is ready), or the label at which the thread terminated, if that label could not flow to lresLabelTCB.

data LResStatus l a Source

Instances

(Show l, Show a) => Show (LResStatus l a)