nn::nex::CallContext::Wait Member Function

Syntax

qBool Wait(
     qUnsignedInt32 uiTimeout = WAIT_INFINITE_TIMEOUT
);

Parameters

Name Description
in uiTimeout The maximum time to wait (in milliseconds). The default uiTimeout is infinite.

Return Values

Returns true if asynchronous processing has completed, and returns false if the timeout was exceeded. If this function returns false, the return value of the CallContext::GetOutcome function is undefined.

Description

Forces the system to wait until asynchronous processes complete or the timeout is exceeded.

This function is called when the SynchronousCall flag in CallContext::Flags is cleared and the CallContext State is CallInProgress. This function calls the Scheduler::Dispatch function internally until asynchronous processing completes or times out.

If the timeout elapses, the SYSTEMERROR_GEN_TIMEOUT error results. Asynchronous processing continues even after a timeout occurs, so the resource specified for the asynchronous processing out argument cannot be released. Explicitly call the CallContext::Cancel function when you want to release the resource specified for the out argument.

This function cannot be called from two threads at the same time. Also, it cannot be called at the same time as the Scheduler::Dispatch function.

See Also

State
CallContext::GetOutcome

Revision History

2011/08/18
Revised the description to match changes in the supported thread mode in which the nn::nex::Scheduler::Dispatch function can be called at execution.
2011/05/09
Added mention that this function cannot be called from two threads at the same time.
2011/01/27
Initial version.

CONFIDENTIAL