ClassesClasses | | Operators

timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitCondition (Operator)

Name

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

Signature

timed_wait_condition( : : ConditionHandle, MutexHandle, Timeout : )

Herror timed_wait_condition(const Hlong ConditionHandle, const Hlong MutexHandle, const Hlong 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)

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

Parameters

ConditionHandleConditionHandleConditionHandleConditionHandleconditionHandle (input_control)  condition HCondition, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Condition synchronization object.

MutexHandleMutexHandleMutexHandleMutexHandlemutexHandle (input_control)  mutex HMutex, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

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


ClassesClasses | | Operators