System.Threading.ManualResetEventSlim Class

Provides a slimmed down version of System.Threading.ManualResetEvent.

See Also: ManualResetEventSlim Members


[System.Diagnostics.DebuggerDisplay("Set = {IsSet}")]
public class ManualResetEventSlim : IDisposable


You can use this class for better performance than System.Threading.ManualResetEvent when wait times are expected to be very short, and when the event does not cross a process boundary. System.Threading.ManualResetEventSlim uses busy spinning for a short time while it waits for the event to become signaled. When wait times are short, spinning can be much less expensive than waiting by using wait handles. However, if the event does not become signaled within a certain period of time, System.Threading.ManualResetEventSlim resorts to a regular event handle wait.


Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: