|
Control.Concurrent.TBox | Portability | non-portable (requires STM) | Stability | experimental | Maintainer | Peter Robinson <thaldyron@gmail.com> |
|
|
|
|
|
Description |
An abstract interface for transactional variables with IO hooks.
|
|
Synopsis |
|
|
|
|
TBox type class
|
|
|
An instance of TBox is a (Adv)STM variable that might contain a value of
some type a. In contrast to a plain TVar, a
TBox has IO hooks that are executed transparently on updates and reads.
The functions of the type class shouldn't be exposed directly but should be used via
the interface defined in the module TBox.Operations.
See the module TFile for a concrete instantiation.
| | Methods | | | Instances | |
|
|
Operations on a TBox
|
|
|
If the TBox is dirty, this retries the transaction and
rereads the content using readIO in a separate thread.
Otherwise it simply returns the result of readSTM.
Note: Depending on the implementation, careless
use of setDirty and read in the same transaction might lead
to nonterminating retry loops.
|
|
|
Writes the new content.
|
|
|
Deletes the content.
|
|
|
Returns True iff the TBox is empty.
|
|
Produced by Haddock version 2.4.2 |