Mono Class Library: System.Threading.Monitor Overview | Members

System.Threading.Monitor.Pulse Method

Notifies the next waiting thread (if any) of a change in the specified locked object's state. [Edit]

public static void Pulse (object obj)

Parameters

obj
The object a thread might be waiting for. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionobj is null. [Edit]
System.Threading.SynchronizationLockExceptionThe calling thread does not own the lock for the specified object. [Edit]

Remarks

The thread that currently owns the lock on the specified object invokes this method to signal the next thread in line for the lock (in the queue of threads waiting to acquire the lock on the object). Upon receiving the pulse, the waiting thread is moved to the ready queue. When the thread that invoked Pulse releases the lock, the next thread in the ready queue (which is not necessarily the thread that was pulsed) acquires the lock.

Note:

To signal a waiting object using Pulse , you must be the current owner of the lock.

To signal multiple threads, use the Monitor.PulseAll(object) method.

[Edit]

Requirements

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