Is notifyAll() required at the end of a synchronized block?
<p>I used to write a <code>synchronized</code> block like:</p>

<pre><code>synchronized(foobar) {
    // do something
}
</code></pre>

<p>But, recently I saw someone write:</p>

<pre><code>synchronized(foobar) {
    // do something
    foobar.notifyAll();
}
</code></pre>

<p>Is <code>foobar.notifyAll();</code> necessary? What happens if I omit it?</p>
