Waiting on an Event

The wait statement suppresses execution of the process until another process causes the event. If the happened state is already HAPPENED, then the wait statement has no effect and the process proceeds immediately. The wait statement does not change the happened or available states of the event.

The waiting process does not use any processor time. Nevertheless, the waiting process is considered active, rather than suspended, and does not appear in the W (Waiting Entries) system command display.

A waiting process is discontinued if it exceeds the time limit specified by the WAITLIMIT task attribute.

The following is an ALGOL statement that waits on the event EVNT1.

WAIT (EVNT1);

In COBOL, the statement appears as follows:

WAIT UNTIL EVNT1.