Task.IAsyncResult.AsyncWaitHandle Property

Definition

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

System.Threading.WaitHandle System.IAsyncResult.AsyncWaitHandle { get; }
Property Value

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

Exceptions

The Task has been disposed.

Remarks

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.

Applies to