timed_wait_conditionT_timed_wait_conditionTimedWaitConditionTimedWaitConditiontimed_wait_condition (Operator)

Name

timed_wait_conditionT_timed_wait_conditionTimedWaitConditionTimedWaitConditiontimed_wait_condition — Bounded wait on the signal of a condition synchronization object.

Signature

timed_wait_condition( : : ConditionHandle, MutexHandle, Timeout : )

Herror T_timed_wait_condition(const Htuple ConditionHandle, const Htuple MutexHandle, const Htuple Timeout)

void TimedWaitCondition(const HTuple& ConditionHandle, const HTuple& MutexHandle, const HTuple& Timeout)

void HCondition::TimedWaitCondition(const HMutex& MutexHandle, Hlong Timeout) const

static void HOperatorSet.TimedWaitCondition(HTuple conditionHandle, HTuple mutexHandle, HTuple timeout)

void HCondition.TimedWaitCondition(HMutex mutexHandle, int timeout)

def timed_wait_condition(condition_handle: HHandle, mutex_handle: HHandle, timeout: int) -> None

Description

timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitConditiontimed_wait_condition atomically unlocks MutexHandleMutexHandleMutexHandleMutexHandlemutexHandlemutex_handle and waits on ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandlecondition_handle, as wait_conditionwait_conditionWaitConditionWaitConditionWaitConditionwait_condition does, but it also bounds the duration of the wait. If ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandlecondition_handle has not been signaled within the amount of time specified by TimeoutTimeoutTimeoutTimeouttimeouttimeout in micro seconds, the mutex MutexHandleMutexHandleMutexHandleMutexHandlemutexHandlemutex_handle is re-acquired and timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitConditiontimed_wait_condition returns the error H_ERR_TIMEOUT.

Using negative values for TimeoutTimeoutTimeoutTimeouttimeouttimeout means an infinite waiting time.

Execution Information

Parameters

ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandlecondition_handle (input_control)  condition HCondition, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Condition synchronization object.

MutexHandleMutexHandleMutexHandleMutexHandlemutexHandlemutex_handle (input_control)  mutex HMutex, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Mutex synchronization object.

TimeoutTimeoutTimeoutTimeouttimeouttimeout (input_control)  number HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Timeout in micro seconds.

Result

timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditionTimedWaitConditiontimed_wait_condition 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_conditionSignalConditionSignalConditionSignalConditionsignal_condition, clear_conditionclear_conditionClearConditionClearConditionClearConditionclear_condition

Module

Foundation