Condividi tramite


Stream.CreateWaitHandle Metodo

Definizione

Attenzione

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

Attenzione

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

Attenzione

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

Alloca un oggetto 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

Restituisce

Riferimento all'oggetto WaitHandle allocato.

Attributi

Commenti

Quando viene chiamato per la prima volta, il metodo corrente crea un WaitHandle oggetto e lo restituisce. Nelle chiamate successive restituisce CreateWaitHandle un riferimento a un nuovo handle di attesa.

Utilizzare questo metodo se si implementano i metodi asincroni e si richiede un modo per bloccare EndRead o EndWrite fino al completamento dell'operazione asincrona.

Si applica a

Vedi anche