Shuts the scheduler down. After shut down no more tasks can be added to the scheduler.
192266
public void shutdown() {
		synchronized (globalLock) {
			for (Instance i : allInstances) {
				i.removeSlotListener();
				i.cancelAndReleaseAllSlots();
			}
			allInstances.clear();
			allInstancesByHost.clear();
			instancesWithAvailableResources.clear();
			taskQueue.clear();
		}
	}
150808
async def shutdown(self):
        ""
        if self.stream:
            if not self.stream.dataeof and not self.stream.dataerror:
                self.stream.close(self.scheduler)
                await self.connection.shutdown()
            else:
                self.stream.close(self.scheduler)
            self.stream = None
921625
def shutdown(self):
        
        task = asyncio.ensure_future(self.core.shutdown())
        self.loop.run_until_complete(task)
233524
void shutdown() {
        runnableProcessor.shutdown();
        if (cursor != null) {
            cursor.shutdown();
        }
        if (screen != null) {
            screen.shutdown();
        }
    }
158200
@Override
    public void shutdown() {
        log.info("Shutting down Ontology crawlers.");
        this.executor.shutdown(); // Disable new tasks from being submitted
        try {
            // Wait a while for existing tasks to terminate
            if (!this.executor.awaitTermination(5, TimeUnit.SECONDS)) {
                this.executor.shutdownNow(); // Cancel currently executing tasks
                // Wait a while for tasks to respond to being cancelled
                if (!this.executor.awaitTermination(2, TimeUnit.SECONDS))
                    log.error("Pool did not terminate");
            }
        } catch (InterruptedException ie) {
            // (Re-)Cancel if current thread also interrupted
            this.executor.shutdownNow();
            // Preserve interrupt status
            Thread.currentThread().interrupt();
        }
    }
882920
@Override
  public void close() {
    executor.shutdown();
    scheduler.shutdown();
    client.close();
    closeFuture.complete(null);
  }
687588
public void shutdown(boolean waitForJobsToComplete) {

        m_isShutdown = true;

        // signal each scheduler thread to shut down
        for (int i = 0; i < m_currentThreadCount; i++) {
            if (m_workers[i] != null) {
                m_workers[i].shutdown();
            }
        }

        // give waiting (wait(1000)) worker threads a chance to shut down
        // active worker threads will shut down after finishing their
        // current job
        synchronized (m_nextRunnableLock) {
            m_nextRunnableLock.notifyAll();
        }

        if (waitForJobsToComplete) {
            // wait until all worker threads are shut down
            int alive = m_currentThreadCount;
            while (alive > 0) {
                alive = 0;
                for (int i = 0; i < m_currentThreadCount; i++) {
                    if (m_workers[i].isAlive()) {
                        try {
                            if (LOG.isDebugEnabled()) {
                                LOG.debug(
                                    Messages.get().getBundle().key(Messages.LOG_THREAD_POOL_WAITING_1, new Integer(i)));
                            }

                            // note: with waiting infinite - join(0) - the application
                            // may appear to 'hang'
                            // waiting for a finite time however requires an additional loop (alive)
                            alive++;
                            m_workers[i].join(200);
                        } catch (InterruptedException e) {
                            // can be ignored
                        }
                    }
                }
            }

            int activeCount = m_threadGroup.activeCount();
            if ((activeCount > 0) && LOG.isInfoEnabled()) {
                LOG.info(
                    Messages.get().getBundle().key(Messages.LOG_THREAD_POOL_STILL_ACTIVE_1, new Integer(activeCount)));
            }
            if (LOG.isDebugEnabled()) {
                LOG.debug(Messages.get().getBundle().key(Messages.LOG_THREAD_POOL_SHUTDOWN_0));
            }
        }
    }
567115
public void shutDown() {
		downloadExecutor.shutdown(); // Disable new tasks from being submitted
		try {
			// Wait a while for existing tasks to terminate
			if (!downloadExecutor.awaitTermination(60, TimeUnit.SECONDS)) {
				downloadExecutor.shutdownNow(); // Cancel currently executing tasks
				// Wait a while for tasks to respond to being cancelled
				if (!downloadExecutor.awaitTermination(60, TimeUnit.SECONDS))
					System.err.println("Pool did not terminate");
			}
		} catch (InterruptedException ie) {
			// (Re-)Cancel if current thread also interrupted
			downloadExecutor.shutdownNow();
			// Preserve interrupt status
			Thread.currentThread().interrupt();
		}
	}
1155184
@Override
    public void close() {
        synchronized (startedTasks) {
            if (executor.isShutdown()) {
                return;
            }
            // ... stop updater thread. Do not interrupt.
            executor.shutdown();
            try {
                updater.get();
            } catch (InterruptedException | CancellationException | ExecutionException ignore) {
                // Ignore these closing thread errors.
            }
            // And stop all the tasks, do interrupting.
            for (InternalTask task : startedTasks) {
                task.cancel(true);
            }
            for (InternalTask task : queuedTasks) {
                task.close();
            }

            try {
                executor.awaitTermination(100L, TimeUnit.MILLISECONDS);
            } catch (InterruptedException ignore) {
                Thread.currentThread().interrupt();
            }
        }
    }
1294424
public void destroy() {
        logger.trace("{} - Destroy called on Batch", name);
        scheduler.shutdown();

        try {
            if (!scheduler.awaitTermination(maxAwaitTimeShutdown, TimeUnit.MILLISECONDS)) {
                logger.warn(
                        "Could not terminate batch within {}. Forcing shutdown.",
                        DurationFormatUtils.formatDurationWords(
                                maxAwaitTimeShutdown,
                                true,
                                true
                        )
                );
                scheduler.shutdownNow();
            }
        } catch (final InterruptedException e) {
            Thread.currentThread().interrupt();
            logger.debug("Interrupted while waiting.", e);
        }

        flush();
    }
594841
public static void shutDown()
    {
        if (Quartz.QUARTZ != null && Quartz.QUARTZ.scheduler != null) {
            try {
                Quartz.QUARTZ.scheduler.shutdown();
            } catch (final SchedulerException e) {
                Quartz.LOG.error("Problems on shutdown of QuartsSheduler", e);
            }
        }
    }
875548
public void shutdown() {
        // Prevent new entries from being added ...
        this.addEntries.set(false);

        // Mark the cursor as being finished; this will stop all consumers from waiting for a batch ...
        this.cursor.complete();

        // Each of the consumer threads will complete the batch they're working on, but will then terminate ...

        // Stop the garbage collection thread (if running) ...
        if (this.gcConsumer != null) this.gcConsumer.close();

        // Now, block until all the runners have completed ...
        for (ConsumerRunner runner : new HashSet<>(consumers)) { // use a copy of the runners; they're removed when they close
            runner.waitForCompletion();
        }
        assert consumers.isEmpty();
    }
266690
public void shutDown() {
		vectorizationExecutor.shutdown(); // Disable new tasks from being submitted
		try {
			// Wait a while for existing tasks to terminate
			if (!vectorizationExecutor.awaitTermination(10, TimeUnit.SECONDS)) {
				vectorizationExecutor.shutdownNow(); // Cancel currently executing tasks
				// Wait a while for tasks to respond to being cancelled
				if (!vectorizationExecutor.awaitTermination(10, TimeUnit.SECONDS))
					System.err.println("Pool did not terminate");
			}
		} catch (InterruptedException ie) {
			// (Re-)Cancel if current thread also interrupted
			vectorizationExecutor.shutdownNow();
			// Preserve interrupt status
			Thread.currentThread().interrupt();
		}
	}
791757
public void shutdown() {
        shutdownListeners.forEach(shutdownListener -> {
            logger.trace("shutting down {}", shutdownListener);
            try {
                shutdownListener.shutdown();
            } catch (Exception e) {
                logger.error("error shutting down {}: {}", shutdownListener, e.getMessage());
            }
        });
    }
1328966
public void shutdown() {

		if (!this.shutdownStarted.compareAndSet(false, true)) {
			return;
		}

		LOG.info("Shutting down TaskManager");
		
		// first, stop the heartbeat thread and wait for it to terminate
		this.heartbeatThread.interrupt();
		try {
			this.heartbeatThread.join(1000);
		} catch (InterruptedException e) {}

		// Stop RPC proxy for the task manager
		RPC.stopProxy(this.jobManager);

		// Stop RPC proxy for the global input split assigner
		RPC.stopProxy(this.globalInputSplitProvider);

		// Stop RPC proxy for the lookup service
		RPC.stopProxy(this.lookupService);

		// Stop RPC proxy for accumulator reports
		RPC.stopProxy(this.accumulatorProtocolProxy);

		// Shut down the own RPC server
		this.taskManagerServer.stop();

		// Stop profiling if enabled
		if (this.profiler != null) {
			this.profiler.shutdown();
		}

		// Shut down the network channel manager
		this.channelManager.shutdown();

		// Shut down the memory manager
		if (this.ioManager != null) {
			this.ioManager.shutdown();
		}

		if (this.memoryManager != null) {
			this.memoryManager.shutdown();
		}

		this.fileCache.shutdown();

		// Shut down the executor service
		if (this.executorService != null) {
			this.executorService.shutdown();
			try {
				this.executorService.awaitTermination(5000L, TimeUnit.MILLISECONDS);
			} catch (InterruptedException e) {
				if (LOG.isDebugEnabled()) {
					LOG.debug(e);
				}
			}
		}

		this.shutdownComplete = true;
	}
321629
public void shutdown()
  {
    log.info("Shutting down...");
    isShutdownRequested = true;

    try
    {
      mainThread.join();
    }
    catch (InterruptedException e)
    {
      log.error(
        "Interrupted which waiting on main daemon thread to complete.");
    }
  }
553624
synchronized public void shutdown()
    {
        m_shutdown.set(true);
        if (m_isExecutorServiceLocal) {
            try {
                m_es.shutdown();
                m_es.awaitTermination(365, TimeUnit.DAYS);
            } catch (InterruptedException e) {
                repairLog.warn("Unexpected interrupted exception", e);
            }
        }
    }