Stream.CreateWaitHandle 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
CreateWaitHandle will be removed eventually. Please use "new ManualResetEvent(false)" instead.
注意
Stream.CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.
注意
CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.
分配 WaitHandle 对象。
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
返回
对已分配的 WaitHandle
的引用。
- 属性
注解
首次调用时,当前方法会创建一个 WaitHandle
对象并返回它。 在后续调用中, CreateWaitHandle
返回对新等待句柄的引用。
如果实现异步方法,并且需要阻止 或 EndReadEndWrite 直到异步操作完成,请使用此方法。