Task.IAsyncResult.AsyncWaitHandle Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Private ReadOnly Property AsyncWaitHandle As WaitHandle
    Implements IAsyncResult.AsyncWaitHandle
WaitHandle IAsyncResult.AsyncWaitHandle { get; }

Property Value

Type: System.Threading.WaitHandle
A WaitHandle that can be used to wait for the task to complete.

Implements

IAsyncResult.AsyncWaitHandle

Exceptions

Exception Condition
ObjectDisposedException

The Task has been disposed.

Remarks

Using the wait functionality provided by Wait should be preferred over using AsyncWaitHandle for similar functionality. For more information, see How to: Wait on One or More Tasks to Complete and TPL With Other Asynchronous Patterns.

Version Information

Silverlight

Supported in: 5

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.