Operator Reference

timed_wait_conditionT_timed_wait_conditionTimedWaitConditionTimedWaitConditiontimed_wait_condition (Operator)

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_conditionTimedWaitConditionTimedWaitConditiontimed_wait_condition atomically unlocks MutexHandleMutexHandleMutexHandlemutexHandlemutex_handle and waits on ConditionHandleConditionHandleConditionHandleconditionHandlecondition_handle, as wait_conditionwait_conditionWaitConditionWaitConditionwait_condition does, but it also bounds the duration of the wait. If ConditionHandleConditionHandleConditionHandleconditionHandlecondition_handle has not been signaled within the amount of time specified by TimeoutTimeoutTimeouttimeouttimeout in micro seconds, the mutex MutexHandleMutexHandleMutexHandlemutexHandlemutex_handle is re-acquired and timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditiontimed_wait_condition 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

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

Condition synchronization object.

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

Mutex synchronization object.

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

Timeout in micro seconds.

Result

timed_wait_conditiontimed_wait_conditionTimedWaitConditionTimedWaitConditiontimed_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_conditionSignalConditionSignalConditionsignal_condition, clear_conditionclear_conditionClearConditionClearConditionclear_condition

Module

Foundation