!
        @brief Wait until the breakpoint is hit.
163717
def wait_for_completion(self):
        
        while self.target.get_state() == Target.TARGET_RUNNING:
            pass

        if self.flash_algo_debug:
            regs = self.target.read_core_registers_raw(list(range(19)) + [20])
            LOG.debug("Registers after flash algo: [%s]", " ".join("%08x" % r for r in regs))

            expected_fp = self.flash_algo['static_base']
            expected_sp = self.flash_algo['begin_stack']
            expected_pc = self.flash_algo['load_address']
            expected_flash_algo = self.flash_algo['instructions']
            if self.use_analyzer:
                expected_analyzer = analyzer
            final_ipsr = self.target.read_core_register('ipsr')
            final_fp = self.target.read_core_register('r9')
            final_sp = self.target.read_core_register('sp')
            final_pc = self.target.read_core_register('pc')
            #TODO - uncomment if Read/write and zero init sections can be moved into a separate flash algo section
            #final_flash_algo = self.target.read_memory_block32(self.flash_algo['load_address'], len(self.flash_algo['instructions']))
            #if self.use_analyzer:
            #    final_analyzer = self.target.read_memory_block32(self.flash_algo['analyzer_address'], len(analyzer))

            error = False
            if final_ipsr != 0:
                LOG.error("IPSR should be 0 but is 0x%x", final_ipsr)
                error = True
            if final_fp != expected_fp:
                # Frame pointer should not change
                LOG.error("Frame pointer should be 0x%x but is 0x%x" % (expected_fp, final_fp))
                error = True
            if final_sp != expected_sp:
                # Stack pointer should return to original value after function call
                LOG.error("Stack pointer should be 0x%x but is 0x%x" % (expected_sp, final_sp))
                error = True
            if final_pc != expected_pc:
                # PC should be pointing to breakpoint address
                LOG.error("PC should be 0x%x but is 0x%x" % (expected_pc, final_pc))
                error = True
            #TODO - uncomment if Read/write and zero init sections can be moved into a separate flash algo section
            #if not _same(expected_flash_algo, final_flash_algo):
            #    LOG.error("Flash algorithm overwritten!")
            #    error = True
            #if self.use_analyzer and not _same(expected_analyzer, final_analyzer):
            #    LOG.error("Analyzer overwritten!")
            #    error = True
            assert error == False
            self.target.set_vector_catch(self._saved_vector_catch)

        return self.target.read_core_register('r0')
822656
private void waitForEventOrTimeout() throws InterruptedException {
        long remainingWait = timeout - timeWaited;
        long millisToWait = remainingWait / 1000000;
        int nanosToWait = (int) (remainingWait % 1000000);
        wait(millisToWait, nanosToWait);
    }
670334
public final synchronized void waitFor() {
        if (this.thread == null)
            return;

        synchronized (this.thread) {
            if (this.thread == null)
                return;

            try {
                this.thread.wait();
            } catch (InterruptedException e) {
                // Wir sind raus.
            }
        }
    }
985397
def wait(predicate, interval=1, message=lambda: "Waiting..."):
    """"""
    ball, next_ball = u"|/-\\", "|"
    sys.stdout.write("    \033[K")
    sys.stdout.flush()
    while not predicate():
        time.sleep(1)
        next_ball = ball[(ball.index(next_ball) + 1) % len(ball)]
        sys.stdout.write("\r " + str(message()) + " " + next_ball + " \033[K")
        sys.stdout.flush()
    print("\r Done. \033[K")
    sys.stdout.flush()
516290
def wait_init(self):
        
        init_done = self.init_done.wait(timeout=self.init_wait_timeout)
        if not init_done:
            if hasattr(self, "peek"):
                app = self.config.get("application")
                if app:
                    bef_init_cmds = app.get("cli_ready_trigger")
                    if bef_init_cmds in self.peek():  # pylint: disable=no-member
                        init_done = True
        return init_done
1259233
def wait(self, interval=SGE_WAIT):
        """"""
        finished = False
        while not finished:
            time.sleep(interval)
            interval = min(2 * interval, 60)
            finished = os.system("qstat -j %s > /dev/null" % (self.name))
210869
public void waitFor(Condition condition) {
        boolean    intr=false;
        lock.lock();
        try {
            while(!condition.isMet()) {
                try {
                    cond.await();
                }
                catch(InterruptedException e) {
                    intr=true;
                }
            }
        }
        finally {
            lock.unlock();
            if(intr) Thread.currentThread().interrupt();
        }
    }
596298
void waitForReady() {
    if (!ready) {
      writeLock();
      try {
        while (!ready) {
          try {
            cond.await(5000, TimeUnit.MILLISECONDS);
          } catch (InterruptedException ie) {
          }
        }
      } finally {
        writeUnlock();
      }
    }
  }
549572
public void waitThreadStopped() { // FIXME: method named in confusing way
        long sleepTime = threads.isEmpty() ? DEFAULT_TEMPORISATION : MIN_CHECK_TIME;
        lock.lock();
        try {
             condition.await(sleepTime, TimeUnit.MILLISECONDS); // NOSONAR 
        } catch (InterruptedException e) {
            log.debug("Interrupted", e);
            Thread.currentThread().interrupt();
        } finally {
            lock.unlock();
        }
    }
633544
def wait(self, timeout):
        ''''''
        logger.debug('Waiting for %fs', timeout)
        return self._event.wait(timeout)
855035
def wait_until_available(resource):
  """'"""
  while True:
    resource.load()
    if resource.state == 'available':
      break
    time.sleep(RETRY_INTERVAL_SEC)
1326600
function waitForStartup(err, pid) {
        if (err) {
            throw new Error('Couldn\'t start ' + bin);
        }

        if (pid || child.exitCode !== null) {
            child.emit('started');
        } else {
            setTimeout(function () {
                pidof(bin, waitForStartup);
            }, 100);
        }
    }
158195
function wait(testCallback, waitCallback) {
          if (!testCallback()) {
            // Wait for timeout
            if ((new Date().getTime()) - startTime < maxLoadTime) {
              Delay.setTimeout(waitCallback);
            } else {
              failed();
            }
          }
        }
661473
public void await() {
		if (interrupted.get()) {
			return;
		}
		try {
			mainLatch.await();
		} catch (InterruptedException e) {
			Thread.currentThread().interrupt();
		}
	}
307933
private void handleBreakpointHit(StackFrame frame, Context cx) {
        breakFlag = false;
        interrupted(cx, frame, null);
    }
1164076
public void waitUntilComplete(long timeout) {
        long base=System.currentTimeMillis();
        long now=0;
        lock.lock();
        try {
            while(processing || count.get() > 0) {
                long delay=timeout-now;
                if(delay <= 0)
                    break;
                try {
                    processing_done.await(delay, TimeUnit.MILLISECONDS);
                    now=System.currentTimeMillis()-base;
                }
                catch(InterruptedException e) {
                }
            }
        }
        finally {
            lock.unlock();
        }
    }
310304
private void waitForTaskToFinish(Future<?> future, long timeout, TimeUnit unit) throws Exception {
      try {
         future.get(timeout, unit);
      } catch (TimeoutException e) {
         throw new Exception("task timed out", e);
      } catch (InterruptedException e) {
         /* Re-assert the thread's interrupted status */
         Thread.currentThread().interrupt();
         if (trace) log.trace("task was interrupted");
      } finally {
         /* no-op if task is completed */
         future.cancel(true); /* interrupt if running */
      }
   }