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
傳回新等候句柄的參考。
如果您實作異步方法,而且需要封鎖 EndRead 或 EndWrite 的方式,直到異步操作完成為止,請使用此方法。