Restarts thread in interactive mode
500187
def icontinue(self):
        
        if self.status != 'paused':
            print_(
                "No sampling to continue. Please initiate sampling with isample.")
            return

        def sample_and_finalize():
            self._loop()
            self._finalize()

        self._sampling_thread = Thread(target=sample_and_finalize)
        self.status = 'running'
        self._sampling_thread.start()
        self.iprompt()
1154517
protected synchronized Thread start(boolean forceRestart) {
        if (!forceRestart && isFixingActive()) {
            fixThread.interrupt();
        }

        if (forceRestart || !isFixingActive()) {
            fixThread = new FixThread();
            fixThread.start();
        }
        return fixThread;
    }
152401
def on_open(self, ws):
        """"""
        def keep_alive(interval):
            while True:
                time.sleep(interval)
                self.ping()

        start_new_thread(keep_alive, (self.keep_alive_interval, ))
486903
public synchronized void start() {
    if (!running) {
      running = true;
      Thread t = new Thread(new CpuStatRunnable(), "ThreadCpuStatsCollector");
      t.setDaemon(true);
      t.start();
    }
  }
1342481
protected void restartImpl(Result<I> result)
  {
    shutdownImpl(ShutdownModeAmp.GRACEFUL, Result.ignore());
    startImpl(result);
  }
171194
public void interrupt() {
		if (!aborted) {
			aborted = true;
			if (executeThread != null) {
				executeThread.interrupt();
			}
			if(helperExecutable != null) {
				helperExecutable.interrupt();
			}
		}
	}
254623
public void restart(Destination dst) throws KNXTimeoutException,
		KNXLinkClosedException
	{
		final byte[] send = DataUnitBuilder.createCompactAPDU(RESTART, null);
		if (dst.isConnectionOriented())
			tl.connect(dst);
		else
			logger.error("doing restart in connectionless mode, " + dst.toString());
		tl.sendData(dst.getAddress(), priority, send);
		// force a reconnect at later time
		tl.disconnect(dst);
	}
1330166
public void start() {
    //only start the thread if the interval is sane
    if(refreshInterval > 0) {
      refreshUsed = new Thread(new DURefreshThread(), 
          "refreshUsed-"+dirPath);
      refreshUsed.setDaemon(true);
      refreshUsed.start();
    }
  }
28220
public static void runUninterruptibly(final Try.Runnable<InterruptedException> cmd) {
        N.checkArgNotNull(cmd);

        boolean interrupted = false;

        try {
            while (true) {
                try {
                    cmd.run();
                    return;
                } catch (InterruptedException e) {
                    interrupted = true;
                }
            }
        } finally {
            if (interrupted) {
                Thread.currentThread().interrupt();
            }
        }
    }
479010
void open(TopologyContext context, SpoutOutputCollector collector,
              int checkpointInterval, KeyValueState<String, CheckPointState> checkpointState) {
        this.context = context;
        this.collector = collector;
        this.checkpointInterval = checkpointInterval;
        this.sleepInterval = checkpointInterval / 10;
        this.checkpointState = checkpointState;
        this.curTxState = checkpointState.get(TX_STATE_KEY);
        lastCheckpointTs = 0;
        recoveryStepInProgress = false;
        checkpointStepInProgress = false;
        recovering = true;
    }
532896
private void startNewReconstituteThread(Runnable runnable) throws InterruptedException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "startNewReconstituteThread");

        if (_reconstituteThreadpool == null)
        {
            createReconstituteThreadPool();
        }

        _reconstituteThreadpool.execute(runnable);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "startNewReconstituteThread");
    }
1295960
private void ensureWatchThreadRunning() {
		if (!threadRunning) {
			thread = new Thread(watchThread);
			thread.setDaemon(true);
			thread.start();
			watchThread.setThread(thread);
			watchThread.updateName();
			threadRunning = true;
		}
	}
1303987
private void performDelay() {
        try {
            TimeUnit.MILLISECONDS.sleep(crawlDelayMechanism.getDelay());
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
            isStopping = true;
        }
    }
99671
public void run() {
        while (true) {
            Object obj;
            try {
                obj = messages.take();
                notifySubscribers(obj);
            } catch (InterruptedException e) {
                // restore interrupted status
                Thread.currentThread().interrupt();
            }
        }
    }
1111066
def _restart_thread(self):
        
        while self.running['restart_thread']:
            try:
                endpoint = self.restart_q.get(timeout=.5)
            except TimeoutError:
                continue
            log.info("_restart_thread(): Restarting Thread for endpoint %s",
                     endpoint)
            self.unsubscribe(endpoint)
            self.subscribe(endpoint)
361645
def restart(self, *args, **kw):
        """"""
        self.stop()
        self.start(*args, **kw)
386050
def _thread_excepthook():
    
    init_old = thread.Thread.__init__
    def init(self, *args, **kwargs):
        init_old(self, *args, **kwargs)
        run_old = self.run
        def run_with_except_hook(*args, **kw):
            try:
                run_old(*args, **kw)
            except (KeyboardInterrupt, SystemExit):

                raise
            except:
                sys.excepthook(*sys.exc_info())
        self.run = run_with_except_hook
    thread.Thread.__init__ = init