title: signal and unlock order
body: <pre><code>void WorkHandler::addWork(Work* w){
      printf("WorkHandler::insertWork Thread, insertWork locking \n");
      lock();
      printf("WorkHandler::insertWork Locked, and inserting into queue \n");
      m_workQueue.push(w);
      signal();
      unLock();
  }
  </code></pre>
  
  <p>I followed a tutorial and I got this. I was wondering if it is ok to change the order of singal() and unLock() like this</p>
  
  <pre><code>void WorkHandler::addWork(Work* w){
      printf("WorkHandler::insertWork Thread, insertWork locking \n");
      lock();
      printf("WorkHandler::insertWork Locked, and inserting into queue \n");
      m_workQueue.push(w);
      unLock();
      signal();
  }
  </code></pre>
  
  <p>If I can't do this, could you please give me details why I am not allowed to do this? 
  Thanks in advance.</p>