Stream.CreateWaitHandle Método

Definición

Precaución

CreateWaitHandle will be removed eventually. Please use

Asigna un objeto WaitHandle.Allocates a WaitHandle object.

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 ();
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
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
Protected Overridable Function CreateWaitHandle () As WaitHandle

Devoluciones

WaitHandle

Referencia al objeto WaitHandle asignado.A reference to the allocated WaitHandle.

Atributos

Comentarios

Cuando se llama por primera vez, el método actual crea un WaitHandle objeto y lo devuelve.When called for the first time, the current method creates a WaitHandle object and returns it. En las llamadas posteriores, CreateWaitHandle devuelve una referencia a un nuevo identificador de espera.On subsequent calls, CreateWaitHandle returns a reference to a new wait handle.

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.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.

Se aplica a