Compartir vía


Stream.CreateWaitHandle Método

Definición

Precaución

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

Precaución

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

Precaución

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

Asigna un objeto 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

Devoluciones

Referencia al objeto WaitHandle asignado.

Atributos

Comentarios

Cuando se llama por primera vez, el método actual crea un WaitHandle objeto y lo devuelve. En las llamadas posteriores, CreateWaitHandle devuelve una referencia a un nuevo identificador de espera.

Use este método si implementa los métodos asincrónicos y requiere una forma de bloqueo en EndRead o EndWrite hasta que se complete la operación asincrónica.

Se aplica a

Consulte también