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
Váš názor
https://aka.ms/ContentUserFeedback.
Připravujeme: V průběhu roku 2024 budeme postupně vyřazovat problémy z GitHub coby mechanismus zpětné vazby pro obsah a nahrazovat ho novým systémem zpětné vazby. Další informace naleznete v tématu:Odeslat a zobrazit názory pro