Stream.CreateWaitHandle Method
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.
Caution
CreateWaitHandle will be removed eventually. Please use "new ManualResetEvent(false)" instead.
Caution
Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.
Caution
CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.
Allocates a WaitHandle object.
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 ();
[System.Obsolete("Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")]
protected virtual System.Threading.WaitHandle CreateWaitHandle ();
[System.Obsolete("CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")]
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.")>]
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
[<System.Obsolete("Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")>]
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
[<System.Obsolete("CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")>]
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
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.