Defines a checkpoint (rendezvous point) and blocks the calling user. The caller waits until a specified number of users (himself inclusive) have reached or passed the checkpoint, or until the specified timeout occurs. The checkpoint is identified by name and is visible for all users, including those running on various remote agents.
A waiting user continues when the specified timeout is reached or the given number of users have called the function for a checkpoint. A user who was timed out has passed the checkpoint and is also regarded as a user who has passed this checkpoint.
Kernel.bdh
GlobalWaitFor( in sName : string, in nCount : number optional, in nTimeout : number optional ): number;
Parameter | Description |
---|---|
sName | Name to identify the checkpoint |
nCount | Number of users who must reach or pass the checkpoint (optional). To specify to wait for all users, omit this parameter or specify ALL_USERS. |
nTimeout | Maximum waiting time in seconds before a timeout occurs (optional). If this parameter is omitted, the timeout is set to INFINITE. |
var hConnection: number; dcltrans transaction TLogon var nRet: number; begin OraLogon(hConnection, "user", "password", "orclnet2"); nRet := GlobalWaitFor("All are logged in", ALL_USERS, 300); if nRet = GLOBAL_SYNCHRONIZED then Print("I am the last user at the checkpoint"); end; end TLogon;