(>>) [Stm] | t1 >> t2 is equal to t1 >>= fun _ -> t2 which first execute t1 and
wait for its result but ignore it, and then behaviors like t2
|
(>>=) [Stm] | t >>= f is an alternative notation of bind t f
|
A | |
abort [Stm] | abort is a single transaction, when executed, abort the whole execution
from current point.
|
atom [Stm] |
This is an analog of
atomically in Haskell, which repeatedly execute
a transaction until the committing succeed.
|
atom_once [Stm] | atom_once execute a transaction and result in Some v if the
transaction success and None if the transaction fail (due to
conflicting in committing or abort).
|
B | |
bind [Stm] | bind t f is a transaction, when executed, first behavior as
transaction t , then feed the reture value to f to get the
consecutive transaction to execute next.
|
C | |
catch [Stm] | catch t f is a transaction, when executed, behaviors as t if no
exception arise, otherwise f is used to catch this exception and
produce the replacing transaction to execute.
|
create [Cothread] | |
D | |
delay [Cothread] | |
E | |
exit [Cothread] | |
I | |
id [Cothread] | |
J | |
join [Cothread] | |
K | |
kill [Cothread] | |
N | |
new_tvar [Stm] |
We provide two functions to create a transactional variable from common
value:
tvar is traditional toplevel declaration as those new* and
create* functions seen in most other library, it is ensured to succeed;
while new_tvar is a transactional declaration (as in Haskell) which may
fail if the execution of the whole transaction it's bound in fails.
|
O | |
or_else [Stm] | or_else t1 t2 is a transaction, when executed, first try to execute
t1 .
|
R | |
read_tvar [Stm] |
Read value from a transactional variable, results in a transaction which
can be further composed with other transactions through
bind etc., or
executed right away with atom etc.
|
retry [Stm] | retry is a transaction, when executed, first wait for the changing of
any transactional variables being read in the history of current
execution, then relaunch the whole execution.
|
retry_now [Stm] | retry_now is a transaction in the same spirit with retry , the only
difference is that it does not wait for any changes and relaunch the
execution immediately.
|
return [Stm] |
Primitive to wrap a plain of type
'a value to a 'a stm , which when
being executed, will produces the orignal value.
|
S | |
select [Cothread] | |
self [Cothread] | |
spawn [Cothread] | spawn f x launch up the computation of (f x) in a separate thread right
away, the result is return as a event which you can sync with.
|
spawnl [Cothread] | spawnl f x returns a event represents the computation of (f x) as a
separate thread, just like spwan .
|
T | |
tvar [Stm] |
Toplevel tvar declaration, produce a transaction variable from a
value.
|
W | |
wait [Stm] | wait is a transaction, when executed, simply wait for the changing of
any transactional variables being read in the history of current
execution, but without relaunch it.
|
wait_pid [Cothread] | |
wait_read [Cothread] | |
wait_signal [Cothread] | |
wait_timed_read [Cothread] | |
wait_timed_write [Cothread] | |
wait_write [Cothread] | |
write_tvar [Stm] | write_tvar tv v write value v to transactional variable tv , results
in a transaction whose type is unit .
|
Y | |
yield [Cothread] |