共用方式為


Stream.CreateWaitHandle 方法

定義

警告

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 的方式,直到異步操作完成為止,請使用此方法。

適用於

另請參閱