IVsTask::WaitEx Method (Int32, UInt32)
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.
Assembly: Microsoft.VisualStudio.Shell.Interop.11.0 (in Microsoft.VisualStudio.Shell.Interop.11.0.dll)
Parameters
- millisecondsTimeout
-
Type:
System::Int32
The timeout (in milliseconds) or INFINITE.
- options
-
Type:
System::UInt32
Values are of type __VSTASKWAITOPTIONS. Set to VSTWO_AbortOnTaskCancellation to abort if a cancellation occurs.
Return Value
Type: System::Booleantrue if the task completed successfully before millisecondsTimeout, otherwise false.
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.