IVsTask.WaitEx(Int32, UInt32) Method

Definition

Waits for the task to complete (not including any continuations). You can either specify a timeout (or INFINITE) or set the option to abort on task cancellation.

public:
 bool WaitEx(int millisecondsTimeout, System::UInt32 options);
public:
 bool WaitEx(int millisecondsTimeout, unsigned int options);
bool WaitEx(int millisecondsTimeout, unsigned int options);
public bool WaitEx (int millisecondsTimeout, uint options);
abstract member WaitEx : int * uint32 -> bool
Public Function WaitEx (millisecondsTimeout As Integer, options As UInteger) As Boolean

Parameters

millisecondsTimeout
Int32

The timeout (in milliseconds) or INFINITE.

options
UInt32

Values are of type __VSTASKWAITOPTIONS. Set to VSTWO_AbortOnTaskCancellation to abort if a cancellation occurs.

Returns

true if the task completed successfully before millisecondsTimeout, otherwise false.

Remarks

If the task returns an error code or an exception, this method returns the same error code. If the task does not complete before the time out, S_OK will be returned with pTaskCompleted set to false.

This method can return VS_E_CIRCULARTASKDEPENDENCY if the task library determines that the call would result in a deadlock. It may also return VS_E_TASKSCHEDULERFAIL, or TaskSchedulingException if the task library was not able to schedule one of the tasks that was required to complete the awaited task.

Applies to