title: Spurious unblocking in boost thread
body: <p>I came across this interesting paragraph in the <a href="http://www.boost.org/doc/libs/1_38_0/doc/html/thread/synchronization.html#thread.synchronization.condvar_ref" rel="noreferrer">Boost thread documentation</a> today:</p>
  
  <pre><code>void wait(boost::unique_lock&lt;boost::mutex&gt;&amp; lock)
  </code></pre>
  
  <p>...</p>
  
  <blockquote>
    <p>Effects: Atomically call lock.unlock()
    and blocks the current thread. The
    thread will unblock when notified by a
    call to this->notify_one() or
    this->notify_all(), or <strong>spuriously</strong>.
    When the thread is unblocked (for
    whatever reason), the lock is
    reacquired by invoking lock.lock()
    before the call to wait returns. The
    lock is also reacquired by invoking
    lock.lock() if the function exits with
    an exception.</p>
  </blockquote>
  
  <p>So what I am interested in is the meaning of the word "spuriously". Why would the thread be unblocked for spurious reasons? What can be done to resolve this?</p>