|
Events <event.h> |
Top Previous Next |
|
This group of functions allows a Diamond program to create and manipulate events, which can be used to synchronize the activity of several concurrently executing threads.
The header file <event.h> declares a type EVENT that is used by these functions.
Events are similar to semaphores, the main difference being that while signalling a semaphore can restart only one waiting thread, setting or pulsing an event restarts all of the waiting threads.
An event can be in one of three states:
Programs should not rely on any relationship between the order in which threads start to wait on an event and the order in which they are resumed.
|