[This is preliminary documentation and is subject to change.]
Waits for a signal from this Sync for a maximum
period of time and obtains the object passed by Signal.
Parameters
- timeoutMillis (Int32)
- The maximum number of milliseconds to wait.
Return Value
The object passed from the signalling thread.
Remarks
If this Sync has already been signalled, this sets it complete
and returns immediately. If it has not been signalled - it is in the ready
state - then it is set into the waiting state and the call blocks until the
Sync is signalled. If another thread is already waiting on this Sync, or
it is complete or timed out, an exception is generated. If the wait times
out, the Sync is set to timed out. Use the TimedOut property
to determine this.
Exceptions
Exception | Condition |
---|---|
InvalidOperationException | Thrown if the Sync state is
either waiting, complete or timed out. |