next up previous contents index
Next: parallel form form ... Up: A high level simulator Previous: simulation.eval simulation expression procedure


Gunk Scheme programs may be multithreaded. A programs starts off with one thread and may create more threads. Threads synchronise by events. Events have two states: unsignalled and signalled. Signalled events are associated with a value. A thread may wait for an event to be signalled by calling the wait procedure. The call to wait returns the value associated with the event when it becomes signalled. The thread is suspended until the event becomes signalled. If the event has already been signalled at the time of the call to wait then the call returns the associated value immediately.

Each thread is associated with an event object that becomes signalled when the thread terminates. In normal execution the thread termination event is associated with the value of the last expression.

Mutual exclusion  is provided by serialization.

Erik Rauch
Sat May 8 16:42:57 EDT 1999