PAUSE

PAUSE

Top  Previous  Next

 

The PAUSE statement pauses execution until awoken by another process.

 

 

Format

 

PAUSE {timeout}

 

where

 

timeoutspecifies the maximum time to wait in seconds. A value less than one indicates that an infinite timeout should be used.

 

 

The PAUSE statement suspends program execution until awoken by another process using the WAKE statement. The optional timeout specifies the maximum time in seconds for which the program can remain suspended.

 

If the PAUSE is terminated by detection of a WAKE event, the STATUS() function will return zero and the INMAT() function will return the user number of the process that performed the WAKE.

 

If the PAUSE is terminated by a timeout, the STATUS() function will return ER$TIMEOUT.

 

A WAKE request occurring before the PAUSE is executed is remembered and the program is not suspended. Note that under rare conditions, precise timing of the PAUSE/WAKE pair can cause a program to appear to wake spuriously. Programs should be written to allow for this possibility.