JCL Help:TJclDispatcherObject.WaitAlertable

From Project JEDI Wiki
Jump to navigationJump to search


Summary

WaitAlertable blocks until the object becomes signaled or the timeout expires.


Pascal

 public function WaitAlertable(const TimeOut: Cardinal): TJclWaitResult;


Parameters

Parameters Description
const TimeOut: Cardinal Interval, in milliseconds, the method waits on an object. If the object does not become signaled before the interval has expired, the method returns.


Return Value

The result indicates success or failure and is of type TJclWaitResult. This method can return any of the members of the enumeration. See TJclWaitResult for the details.


Description

WaitAlertable checks the state of the object, if it is non-signaled the calling thread enters an alertable wait-state until one of the following occurs:

  • The object becomes signaled.
  • The time-out interval expires.
  • An I/O completion routine or asynchronous procedure call is queued to the thread.

If the object is signaled, or one of the above mentioned events occur while in a wait-state, the method returns and the calling thread is allowed to continue execution. Note that successfully waiting on a dispatcher object can, depending on the object, modify the state of the underlying object. For example, the count of a semaphore is decreased by one before the method returns. See the individual synchronization classes and the Platform SDK for details.


See Also

WaitFor WaitForever WaitForMultipleObjects WaitAlertableForMultipleObjects


About

Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page