| (>>) [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.
|
| always [Event] | always v returns an event that is always ready for
synchronization.
|
| 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.
|
| broadcast [Condition] | broadcast c restarts all processes waiting on the
condition variable c.
|
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.
|
| choose [Event] | choose evl returns the event that is the alternative of
all the events in the list evl.
|
| create [Thread] | Thread.create funct arg creates a new thread of control,
in which the function application funct arg
is executed concurrently with the other threads of the program.
|
| create [Mutex] |
Return a new mutex.
|
| create [Cothread] | |
| create [Condition] |
Return a new condition variable.
|
D | |
| delay [Thread] | delay d suspends the execution of the calling thread for
d seconds.
|
| delay [Cothread] | |
E | |
| exit [Thread] |
Terminate prematurely the currently executing thread.
|
| exit [Cothread] | |
G | |
| guard [Event] | guard fn returns the event that, when synchronized, computes
fn() and behaves as the resulting event.
|
I | |
| id [Thread] |
Return the identifier of the given thread.
|
| id [Cothread] | |
J | |
| join [Thread] | join th suspends the execution of the calling thread
until the thread th has terminated.
|
| join [Cothread] | |
K | |
| kill [Thread] |
Terminate prematurely the thread whose handle is given.
|
| kill [Cothread] | |
L | |
| lock [Mutex] |
Lock the given mutex.
|
N | |
| new_channel [Event] |
Return a new channel.
|
| 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.
|
P | |
| poll [Event] |
Non-blocking version of
Event.sync: offer all the communication
possibilities specified in the event to the outside world,
and if one can take place immediately, perform it and return
Some r where r is the result value of that communication.
|
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.
|
| receive [Event] | receive ch returns the event consisting in receiving a value
from the channel ch.
|
| 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 [Thread] |
Suspend the execution of the calling thead until input/output
becomes possible on the given Unix file descriptors.
|
| select [Event] |
``Synchronize'' on an alternative of events.
|
| select [Cothread] | |
| self [Thread] |
Return the thread currently executing.
|
| self [Cothread] | |
| send [Event] | send ch v returns the event consisting in sending the value v
over the channel ch.
|
| sigmask [Thread] | sigmask cmd sigs changes the set of blocked signals for the
calling thread.
|
| signal [Condition] | signal c restarts one of the processes waiting on the
condition variable c.
|
| 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.
|
| sync [Event] |
``Synchronize'' on an event: offer all the communication
possibilities specified in the event to the outside world,
and block until one of the communications succeed.
|
T | |
| try_lock [Mutex] |
Same as
Mutex.lock, but does not suspend the calling thread if
the mutex is already locked: just return false immediately
in that case.
|
| tvar [Stm] |
Toplevel tvar declaration, produce a transaction variable from a
value.
|
U | |
| unlock [Mutex] |
Unlock the given mutex.
|
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 [Condition] | wait c m atomically unlocks the mutex m and suspends the
calling process on the condition variable c.
|
| wait_pid [Thread] | wait_pid p suspends the execution of the calling thread
until the process specified by the process identifier p
terminates.
|
| wait_pid [Cothread] | |
| wait_read [Thread] |
See
Thread.wait_write.
|
| wait_read [Cothread] | |
| wait_signal [Thread] | wait_signal sigs suspends the execution of the calling thread
until the process receives one of the signals specified in the
list sigs.
|
| wait_signal [Cothread] | |
| wait_timed_read [Thread] | |
| wait_timed_read [Cothread] | |
| wait_timed_write [Thread] |
Suspend the execution of the calling thread until at least
one character is available for reading (
wait_read) or
one character can be written without blocking (wait_write)
on the given Unix file descriptor.
|
| wait_timed_write [Cothread] | |
| wait_write [Thread] |
This function does nothing in this implementation.
|
| wait_write [Cothread] | |
| wrap [Event] | wrap ev fn returns the event that performs the same communications
as ev, then applies the post-processing function fn
on the return value.
|
| wrap_abort [Event] | wrap_abort ev fn returns the event that performs
the same communications as ev, but if it is not selected
the function fn is called after the synchronization.
|
| write_tvar [Stm] | write_tvar tv v write value v to transactional variable tv, results
in a transaction whose type is unit.
|
Y | |
| yield [Thread] |
Re-schedule the calling thread without suspending it.
|
| yield [Cothread] |