Task.IAsyncResult.AsyncWaitHandle Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a WaitHandle that can be used to wait for the task to complete.
property System::Threading::WaitHandle ^ System::IAsyncResult::AsyncWaitHandle { System::Threading::WaitHandle ^ get(); };
System.Threading.WaitHandle System.IAsyncResult.AsyncWaitHandle { get; }
member this.System.IAsyncResult.AsyncWaitHandle : System.Threading.WaitHandle
ReadOnly Property AsyncWaitHandle As WaitHandle Implements IAsyncResult.AsyncWaitHandle
Property Value
A WaitHandle that can be used to wait for the task to complete.
Implements
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
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET