Monitor.pulse Method
<p>Can anybody shed a bit of light on this piece of code. The step by step working? What i understand id that the critical section of code is locked to be accessed by a single thread at a time.</p>

<pre><code>lock (buf)
{
    buf.AddRange(ary);
    Monitor.Pulse(buf);
}
</code></pre>

<p>PS: Msdn explains pulse as</p>

<blockquote>
  <p>Pulse (signal), PulseAll</p>
</blockquote>

<p>Sends a signal to one or more waiting threads. The signal notifies a waiting thread that the state of the locked object has changed, and the owner of the lock is ready to release the lock. The waiting thread is placed in the object's ready queue so that it might eventually receive the lock for the object. Once the thread has the lock, it can check the new state of the object to see if the required state has been reached. </p>
