Stream.CreateWaitHandle 方法

定义

注意

CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.

注意

CreateWaitHandle will be removed eventually. Please use "new ManualResetEvent(false)" instead.

注意

Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.

分配对象 WaitHandle

protected:
 virtual System::Threading::WaitHandle ^ CreateWaitHandle();
[System.Obsolete("CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")]
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();
protected virtual System.Threading.WaitHandle CreateWaitHandle();
[<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
[<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
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
Protected Overridable Function CreateWaitHandle () As WaitHandle

返回

对已 WaitHandle分配的引用。

属性

注解

首次调用时,当前方法将创建一个 WaitHandle 对象并返回它。 在后续调用中, CreateWaitHandle 返回对新等待句柄的引用。

如果实现异步方法,并且需要阻止 EndReadEndWrite 直到异步操作完成为止,请使用此方法。

适用于

另请参阅