Stream.CreateWaitHandle Method
Definition
Caution
CreateWaitHandle will be removed eventually. Please use
Allocates a WaitHandle object.
protected:
virtual System::Threading::WaitHandle ^ CreateWaitHandle();
protected virtual System.Threading.WaitHandle CreateWaitHandle ();
[System.Obsolete("CreateWaitHandle will be removed eventually. Please use "new ManualResetEvent(false)" instead.")]
protected virtual System.Threading.WaitHandle CreateWaitHandle ();
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
[<System.Obsolete("CreateWaitHandle will be removed eventually. Please use "new ManualResetEvent(false)" instead.")>]
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
Protected Overridable Function CreateWaitHandle () As WaitHandle
Returns
A reference to the allocated WaitHandle
.
- Attributes
Remarks
When called for the first time, the current method creates a WaitHandle
object and returns it. On subsequent calls, CreateWaitHandle
returns a reference to a new wait handle.
Use this method if you implement the asynchronous methods and require a way of blocking in EndRead or EndWrite until the asynchronous operation is complete.