Tries to interrupt execution.
Execution code is interrupted if it sleeps once in a while.
171194
public void interrupt() {
		if (!aborted) {
			aborted = true;
			if (executeThread != null) {
				executeThread.interrupt();
			}
			if(helperExecutable != null) {
				helperExecutable.interrupt();
			}
		}
	}
641598
public void interrupt() {
        Thread t = threadVar.get();
        if (t != null) {
            t.interrupt();
        }
        threadVar.clear();
    }
203561
public void sleep(String sleepMillis) throws NumberFormatException {

        try {
            Thread.sleep(Long.parseLong(sleepMillis));
        } catch (InterruptedException e) {
            // ignore
        }
    }
649880
public void waitEnd(final long... timeout) {

        long start = System.currentTimeMillis();
        if (timeout.length == 1) {
            start += timeout[0];
        } else {
            start += DEFAULT_TIME_OUT;
        }

        while (!this.hasRun.get()) {
            try {
                Thread.sleep(SLEEP_TIME);
            } catch (final InterruptedException e) {
                break;
            }
            if (System.currentTimeMillis() > start) {
                break; // Break the loop after 1s to avoid freezing the thread
            }
        }

    }
1007274
def interrupt(self, data=None):
        
        self.interrupted = True
        if data is not None:
            return self.write(data)
        else:
            return True
569435
def interrupt (aggregate):
    """"""
    while True:
        try:
            log.warn(LOG_CHECK,
               _("interrupt; waiting for active threads to finish"))
            log.warn(LOG_CHECK,
               _("another interrupt will exit immediately"))
            abort(aggregate)
            break
        except KeyboardInterrupt:
            pass
711621
@NullSafe
  public static void interrupt(Thread thread) {
    Optional.ofNullable(thread).ifPresent(Thread::interrupt);
  }
979101
protected void sleep() {
    try {
      Thread.sleep(sleepIntervalInMillis);
    } catch (InterruptedException exception) {
      Thread.currentThread().interrupt();
      throw new SelendroidException(exception);
    }
  }
514270
public void shutdownBlocking() throws InterruptedException
    {
        executor.shutdown();
        executor.awaitTermination();
        allocator.shutdown();
        allocator.awaitTermination();
    }
1256348
def no_sleep():
	
	mode = power.ES.continuous | power.ES.system_required
	handle_nonzero_success(power.SetThreadExecutionState(mode))
	try:
		yield
	finally:
		handle_nonzero_success(power.SetThreadExecutionState(power.ES.continuous))
505903
private static void method() {
//		StopWatch stopWatch = new LoggingStopWatch();
		Split split = SimonManager.getStopwatch("codeBlock2").start();

		try {
			// the code block being timed - this is just a dummy example
			long sleepTime = (long) (Math.random() * 1000L);
			Thread.sleep(sleepTime);
			if (sleepTime > 500L) {
				throw new Exception("Throwing exception");
			}

			split.stop("success");
//			stopWatch.stop("codeBlock2.success", "Sleep time was < 500 ms");
		} catch (Exception e) {
			split.stop("failure");
//			stopWatch.stop("codeBlock2.failure", "Exception was: " + e);
		}
	}
66131
protected void checkPauseAndWait() {
		pauseLock.lock();
		try {
			while (paused && ! stopped) {
				pausedCondition.await();
			}
		} catch (InterruptedException e) {
		} finally {
			pauseLock.unlock();
		}
	}
1370564
public synchronized void cancel() // d583637
    {
        ivIsCanceled = true;
        stopAlarm();

        // F743-33394 - Wait for the sweep to finish.
        while (ivIsRunning) {
            try {
                wait();
            } catch (InterruptedException ex) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    Tr.debug(tc, "interrupted", ex);
                Thread.currentThread().interrupt();
            }
        }

        ivActivator = null;
    }
786052
def interrupt(self, interrupt):
        """"""
        self._interrupt = True
        self.stop()
        self._interrupt = interrupt
28918
public static function pause()
    {
        if (!self::$output) {
            return;
        }

        self::$output->writeln("<info>The execution has been paused. Press ENTER to continue</info>");

        if (trim(fgets(STDIN)) != chr(13)) {
            return;
        }
    }
1312192
def stop(self):
        
        self.stopped_by_interrupt = True

        if self.executor:
            self.executor.stop()
1205183
public void tick() throws InterruptedException {
    if (mPreviousTickMs != 0) {
      long executionTimeMs = mClock.millis() - mPreviousTickMs;
      if (executionTimeMs > mIntervalMs) {
        mLogger.warn("{} last execution took {} ms. Longer than the interval {}", mThreadName,
            executionTimeMs, mIntervalMs);
      } else {
        mSleeper.sleep(Duration.ofMillis(mIntervalMs - executionTimeMs));
      }
    }
    mPreviousTickMs = mClock.millis();
  }