F.54 ctThrdBlockWait
Wait for a block to clear.
Short Name
ctThrdBlockWait
TYPE
Threading function
DECLARATION
NINT ctThrdBlockWait(pctBLOCK block, LONG timeout)DESCRIPTION
ctThrdBlockWait behaves similarly to ctThrdBlockGet except that it does not acquire the block. Rather, it simply waits until the block is not acquired by any thread before permitting the thread to continue. Any number of threads can attempt to wait on a block. Whether or not all waiting threads will successfully pass the block before another thread acquires the block is system dependent. To encourage this behavior, each thread successfully passing a block automatically yields to the other threads.
RETURN
Value Symbolic Constant Explanation 0 NO_ERROR Successfully acquired block. 156 NTIM_ERR block in use by another thread. Timeout error. 636 TSYF_ERR block get failed.See Appendix A "c-tree Plus Error Codes" of the c-tree Plus Programmer's Reference Guide for a complete listing of valid c-tree Plus error values.
LIMITATIONS
Can only be used with a ctThrd library.
SEE ALSO
ctThrdBlockCls, ctThrdBlockGet, and ctThrdBlockRel.
|
FairCom Corporation www.faircom.com |