By including a time limit on a wait statement, you can make it possible for a process to recover if a particular important event is not caused. For example, the following statement could be used in ALGOL:
ENUM:= WAIT ((120),E1);
This statement waits for 120 seconds or until event E1 is caused, whichever comes first. For example, you might know that if E1 is not caused within 120 seconds, then something has gone wrong. The process could check the value of ENUM to determine if the wait timed out. If so, the process could check the STATUS task attribute of the process that was supposed to cause the event and find out whether that process was discontinued. (This type of checking is possible only if the process has access to the task variable of the process that was supposed to cause the event.)

