title: How to get threads to run one at a time?
body: <p>I'm writing a lift controller and I currently have it working with two threads: one for the lift object and one for the person object. They both call a lift controller class that correctly orders their actions using wait/notify. I want to get it to work with multiple person threads and one lift thread. So I when a second person thread requests the lift, it should wait until the current person thread has reached a pausable point.</p>
  
  <p>The problem is that the <code>notify()</code> method does not specify which thread is notified.. How do I overcome this so that notify only notifies the person thread that I am currently interleaving with the lift thread instead of notifying some random person thread that is in queue?</p>
  
  <p>Thanks</p>