ClassesClasses | | Operators

try_wait_eventtry_wait_eventTryWaitEventTryWaitEvent (Operator)

Name

try_wait_eventtry_wait_eventTryWaitEventTryWaitEvent — Lock an event synchronization object only if it is unlocked.

Signature

try_wait_event( : : EventHandle : Busy)

Herror try_wait_event(const Hlong EventHandle, Hlong* Busy)

Herror T_try_wait_event(const Htuple EventHandle, Htuple* Busy)

void TryWaitEvent(const HTuple& EventHandle, HTuple* Busy)

Hlong HEvent::TryWaitEvent() const

static void HOperatorSet.TryWaitEvent(HTuple eventHandle, out HTuple busy)

int HEvent.TryWaitEvent()

Description

try_wait_eventtry_wait_eventTryWaitEventTryWaitEventTryWaitEvent behaves identically to wait_eventwait_eventWaitEventWaitEventWaitEvent, except that it does not block the calling thread when waiting until the object is signaled but returns immediately. The state of the event before entering try_wait_eventtry_wait_eventTryWaitEventTryWaitEventTryWaitEvent is returned in BusyBusyBusyBusybusy. 1 indicates that the event was nonsignaled before calling try_wait_eventtry_wait_eventTryWaitEventTryWaitEventTryWaitEvent, 0 that the event was signaled.

Execution Information

Parameters

EventHandleEventHandleEventHandleEventHandleeventHandle (input_control)  event HEvent, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Event synchronization object.

BusyBusyBusyBusybusy (output_control)  number HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Object already locked?

Result

If the event handle is valid, the operator try_wait_eventtry_wait_eventTryWaitEventTryWaitEventTryWaitEvent returns 2 (H_MSG_TRUE). If necessary, an exception is raised.

Possible Predecessors

create_eventcreate_eventCreateEventCreateEventCreateEvent

Possible Successors

signal_eventsignal_eventSignalEventSignalEventSignalEvent

See also

wait_eventwait_eventWaitEventWaitEventWaitEvent

Module

Foundation


ClassesClasses | | Operators