timed_wait_conditionT_timed_wait_conditionTimedWaitConditionTimedWaitCondition (Operator)
Name
timed_wait_conditionT_timed_wait_conditionTimedWaitConditionTimedWaitCondition
— Bounded wait on the signal of a condition synchronization object.
Signature
Description
timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitCondition
atomically unlocks MutexHandleMutexHandleMutexHandleMutexHandlemutexHandle
and
waits on
ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandle
, as wait_conditionwait_conditionWaitConditionWaitConditionWaitCondition
does, but it also bounds
the duration of the wait. If ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandle
has not been signaled
within the amount of time specified by TimeoutTimeoutTimeoutTimeouttimeout
in micro seconds,
the mutex MutexHandleMutexHandleMutexHandleMutexHandlemutexHandle
is re-acquired and
timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitCondition
returns the error H_ERR_TIMEOUT.
Using negative values for TimeoutTimeoutTimeoutTimeouttimeout
means an infinite waiting time.
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandle
(input_control) condition →
HCondition, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Condition synchronization object.
MutexHandleMutexHandleMutexHandleMutexHandlemutexHandle
(input_control) mutex →
HMutex, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Mutex synchronization object.
TimeoutTimeoutTimeoutTimeouttimeout
(input_control) number →
HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Timeout in micro seconds.
Result
timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitCondition
returns 2 (H_MSG_TRUE) if all parameters are correct.
If necessary, an exception is raised. If a timeout occurs, the error
H_ERR_TIMEOUT is raised.
Possible Successors
signal_conditionsignal_conditionSignalConditionSignalConditionSignalCondition
,
clear_conditionclear_conditionClearConditionClearConditionClearCondition
Module
Foundation