title: Control not returning to the waiting thread after notify
body: <p>I created a new thread called <code>ThreadA</code> and started that in the main thread.</p>
  
  <p>I waited for some operations to be completed in <code>ThreadA</code>.</p>
  
  <p>After some operations I sent notification using <code>notify</code>.</p>
  
  <p>But the code below the <code>wait</code> in the main thread is not called, it waits for the entire code of the <code>ThreadA</code> to complete.</p>
  
  <p>Is it the nature of threading or simply thread getting access to run problem?</p>
  
  <pre><code>Job job = new MyJob(); 
  job.schedule(); 
  synchronized(job) {
      job.wait(); 
      sysout("After notify");
  } 
  </code></pre>
  
  <p>Here <code>job</code> is org.eclipse.core.runtime.jobs</p>
  
  <p>Inside Job run method: </p>
  
  <pre><code>run {
      synchronized(this) {
          step 1(); 
          notify(); 
          step 2();
      }
  } 
  </code></pre>
  
  <p>Here step 2 is big code. </p>