List |
public bool WaitForProgress( out int? progressID, int? timeout = null )
This will be a value originally specified as the parameter of CommandListAppendProgress(Int32).
null (or omitted) | use the default timeout period specified by ClientAPITimeout |
-1 | wait indefinitely for the event |
0 | do not wait, simply check if an event has already been reported |
> 0 | timeout period in ms |
true | if an event is reported within the specified timeout period. |
false | but only if timeout== 0 and no event has occurred. If timeout!= 0 and no event has occurred, a TimeoutException will be thrown. |
Exception | Condition |
---|---|
TimeoutException | Timeout occurred before the event. |
ThreadInterruptedException | The wait was interrupted prematurely. |
ListExecutionException | see12.7 Exceptions and Errors |
ExecutionException | see12.7 Exceptions and Errors |
FatalException | see12.7 Exceptions and Errors |
AbortedException | see12.7 Exceptions and Errors |
OutOfFieldException | see12.7 Exceptions and Errors |
Note that this function will throw a TimeoutException if no event is reported within the specified timeout period.
Use TryWaitForProgress(NullableInt32, NullableInt32) if no exception is desired.
Waiting can be interrupted by calling InterruptWaitForProgress.
Doing so will cause a ThreadInterruptedException.
If your application inserts very many PROGRESS_ID s into its lists, it may not be able to rely on the occurrence of every single progress event in the sequence.