Stream.CreateWaitHandle Método

Definição

Cuidado

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

Cuidado

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

Cuidado

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

Aloca um 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

Retornos

Uma referência ao WaitHandle alocado.

Atributos

Comentários

Quando chamado pela primeira vez, o método atual cria um WaitHandle objeto e o retorna. Em chamadas subsequentes, CreateWaitHandle retorna uma referência a um novo identificador de espera.

Use esse método se você implementar os métodos assíncronos e exigir uma maneira de bloquear dentro EndRead ou EndWrite até que a operação assíncrona seja concluída.

Aplica-se a

Confira também