Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Task::IAsyncResult::AsyncWaitHandle Property

 

Gets a WaitHandle that can be used to wait for the task to complete.

Namespace:   System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

private:
property WaitHandle^ AsyncWaitHandle {
	virtual WaitHandle^ get() sealed = IAsyncResult::AsyncWaitHandle::get;
}

Property Value

Type: System.Threading::WaitHandle^

A WaitHandle that can be used to wait for the task to complete.

Exception Condition
ObjectDisposedException

The Task has been disposed.

Using the wait functionality provided by Task::Wait is preferable to using AsyncWaitHandle for similar functionality. For more information, see the "Waiting on Tasks" section in Task-based Asynchronous Programming and Using TPL with Other Asynchronous Patterns.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 5.0
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Return to top
Show: