Operators |
create_event — Create an event synchronization object.
create_event( : : AttribName, AttribValue : EventHandle)
An event is a prelocked mutual exclusion that does not belong to a thread, i.e., it can be signaled by a thread different from the locking thread. This understanding is, e.g., close to the definition of an event in WIN32-API or a semaphore with count 0 in POSIX threads.
create_event allocates and initializes the event object according to the attributes specified in AttribName and AttribValue. AttribName specifies the attribute class and AttribValue the kind of the event. The description beneath lists all mutex kinds supported by following classes:
empty string sets the default attributes.
specifies what happens if a thread waits on a signal to an event:
simply suspends the calling thread (default).
a fast event implementation that waits busy on a signal. This type is non recursive.
Mutex attribute.
Default value: []
List of values: 'type'
Mutex attribute value.
Number of elements: AttribValue == AttribName
Default value: []
List of values: 'sleep' , 'spin'
Event synchronization object.
create_event returns 2 (H_MSG_TRUE) if all parameters are correct. If necessary, an exception is raised.
wait_event, signal_event, clear_event
Foundation
Operators |