public void shutdown()

in src/main/java/org/apache/servicemix/executors/impl/ExecutorImpl.java [73:93]


    public void shutdown() {
        try {
            this.executorFactory.unregisterMBean(this);
        } catch (Exception ex) {
            // ignored
        }
        threadPool.shutdown();
        if (!threadPool.isTerminated() && config.getShutdownDelay() > 0) {
            new Thread(new Runnable() {
                public void run() {
                    try {
                        if (!threadPool.awaitTermination(config.getShutdownDelay(), TimeUnit.MILLISECONDS)) {
                            threadPool.shutdownNow();
                        }
                    } catch (InterruptedException e) {
                        // Do nothing
                    }
                }
            }).start();
        }
    }