void waitForSuspend(int timeout,int period,int isolateId) throws NotConnectedException {
  IsolateSession workerSession=m_session.getWorkerSession(isolateId);
  while (timeout > 0) {
    processEvents();
    if (workerSession.isSuspended())     break;
    try {
      Thread.sleep(period);
    }
 catch (    InterruptedException ie) {
    }
    timeout-=period;
  }
}

void waitForSuspend ( int timeout , int period , int isolateId ) throws NotConnectedException { IsolateSession workerSession = m_session . getWorkerSession ( isolateId ) ; while ( timeout > 0 ) { processEvents ( ) ; if ( workerSession . isSuspended ( ) ) break ; try { Thread . sleep ( period ) ; } catch ( InterruptedException ie ) { } timeout -= period ; } }
we spin in this spot until the player reaches the requested suspend state , either true or false . < p / > during this time we wake up every period milliseconds and update the display and our state with information received from the debug event queue .
