Stream.CreateWaitHandle メソッド

定義

注意事項

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

WaitHandle オブジェクトを割り当てます。Allocates a WaitHandle object.

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.")]
protected virtual System.Threading.WaitHandle CreateWaitHandle ();
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
Protected Overridable Function CreateWaitHandle () As WaitHandle

戻り値

WaitHandle

割り当てられた WaitHandle への参照。A reference to the allocated WaitHandle.

属性

注釈

最初に呼び出されたときに、現在のメソッドは WaitHandle オブジェクトを作成し、それを返します。When called for the first time, the current method creates a WaitHandle object and returns it. 後続の呼び出しでは、 CreateWaitHandle 新しい待機ハンドルへの参照を返します。On subsequent calls, CreateWaitHandle returns a reference to a new wait handle.

非同期メソッドを実装し、 EndRead EndWrite 非同期操作が完了するまでまたはでブロックする方法を必要とする場合は、このメソッドを使用します。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.

適用対象

こちらもご覧ください