class GEvent

Thread synchronization class.

Public Methods

[more]void set()
Sets the event object to signaled.
[more]void wait()
Waits until the event object is signaled.
[more]void wait(int timeout)
Waits until the event object is signaled with a timeout.


Documentation

Thread synchronization class. Class GEvent provides a simple way to synchronize several threads. An event object can be either signaled or non-signaled. Event objects are initially non-signaled. Function set turns an event object to signaled. Function wait waits until the event object is signaled and then turns it to non-signaled.

Note. Both the copy constructor and the copy operator are declared as private members. It is therefore not possible to make multiple copies of instances of this class, as implied by the class semantic.

ovoid set()
Sets the event object to signaled.

ovoid wait()
Waits until the event object is signaled. If the event object was signaled before, the event object is turned to non signaled and this function returns immediately. If the event object was not signaled, this function waits until another thread calls function set, then turns the object to the non-signaled state and returns.

ovoid wait(int timeout)
Waits until the event object is signaled with a timeout. This function is similar to wait but will return after timeout milliseconds, regardless of the status of the event object.


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java