When a number of processes are being synchronized by using events, unexpected problems can occur if one of the processes is discontinued. A process might be discontinued by the system because of an error, or by an operator using a DS (Discontinue) system command.
If the process has procured an event, but has not yet liberated it, then the event remains procured when the process is discontinued. Any other processes attempting to unconditionally procure the event will wait indefinitely.
Similarly, if the process was supposed to execute a cause statement, but was discontinued first, then the event is never caused. Other processes waiting on the event wait indefinitely, unless the processes use a wait statement with a time limit or multiple events. Refer to Waiting on Time and Waiting on Multiple Events earlier in this section.
The programmer can ignore these problems if none of the processes using an event is ever likely to be discontinued. However, in environments such as a SHAREDBYALL library, where a large number of user processes from various sources can access the same event, the programmer might want to take special precautions. The following subsections describe methods of dealing with these problems.
An additional alternative is to replace an event with an interlock, as discussed under Discontinued Processes and Events later in this section.

