Stream.CreateWaitHandle Metoda

Definicja

Przestroga

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

Przestroga

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

Przestroga

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

WaitHandle Przydziela obiekt.

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

Zwraca

Odwołanie do przydzielonego WaitHandle.

Atrybuty

Uwagi

Po wywołaniu metody po raz pierwszy bieżąca metoda tworzy WaitHandle obiekt i zwraca go. Po kolejnych wywołaniach CreateWaitHandle funkcja zwraca odwołanie do nowego dojścia oczekiwania.

Użyj tej metody, jeśli implementujesz metody asynchroniczne i wymagasz sposobu blokowania w EndRead metodzie lub EndWrite do momentu zakończenia operacji asynchronicznej.

Dotyczy

Zobacz też