Causing an Event

The cause statement sets the happened state to HAPPENED and reactivates all processes that are waiting on the happened state of an event. Causing an event has no effect on the available state. The process that performs the cause continues without interruption.

Reactivating a process simply makes that process eligible for processor time. The priority of the process, compared to other processes in the mix, determines how soon the process resumes execution.

The happened state can be reset as soon as it is caused, if another process is waiting on the event with a wait and reset statement. Refer to Waiting on and Resetting an Event later in this section.

An ALGOL statement can cause only one event at a time. The following ALGOL statement causes the event EVNT:

CAUSE (EVNT);

A single COBOL statement can cause one or more events, as in the following example:

CAUSE EVNT1, EVNT2, EVNT3.