Mono Class Library: System.IO.Stream Overview | Members

System.IO.Stream.CreateWaitHandle Method

Allocates a System.Threading.WaitHandle object. [Edit]

[System.Obsolete("CreateWaitHandle is due for removal. Use "new ManualResetEvent(false)" instead.")]
protected virtual System.Threading.WaitHandle CreateWaitHandle ()

Returns

A reference to the allocated System.Threading.WaitHandle. [Edit]

Remarks

When called for the first time this method creates a System.Threading.WaitHandle object and returns it. On subsequent calls, the Stream.CreateWaitHandle method returns a reference to the same wait handle.

Note: Stream.CreateWaitHandle is useful if you implement the asynchronous methods and require a way of blocking in Stream.EndRead(IAsyncResult) or Stream.EndWrite(IAsyncResult) until the asynchronous operation is complete.

[Edit]

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0