Stream.CreateWaitHandle Método

Definição

Atenção

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

Atenção

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

Atenção

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

Aloca um WaitHandle objeto.

protected:
 virtual System::Threading::WaitHandle ^ CreateWaitHandle();
[System.Obsolete("CreateWaitHandle has been deprecated. Use the ManualResetEvent(false) constructor instead.")]
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();
protected virtual System.Threading.WaitHandle CreateWaitHandle();
[<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
[<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
abstract member CreateWaitHandle : unit -> System.Threading.WaitHandle
override this.CreateWaitHandle : unit -> System.Threading.WaitHandle
Protected Overridable Function CreateWaitHandle () As WaitHandle

Devoluções

Uma referência ao .WaitHandle

Atributos

Observações

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

Use este método se implementar os métodos assíncronos e precisar de uma forma de bloquear dentro EndRead ou EndWrite até que a operação assíncrona esteja concluída.

Aplica-se a

Ver também