public static void setThreadPool(ExecutorService newThreadPool) {
        if (RUNTIME_ASSERTIONS) {
            if (newThreadPool == null) {
                throw Exceptions
                        .IllegalArgument("newThreadPool may not be null");
            }
        }

        threadPool = newThreadPool;
    }
public static void setThreadPool ( ExecutorService newThreadPool ) { if ( RUNTIME_ASSERTIONS ) { if ( newThreadPool == null ) { throw Exceptions . IllegalArgument ( "newThreadPool may not be null" ) ; } } threadPool = newThreadPool ; }
By default, the spawn() methods use their own
{@link Executors#newCachedThreadPool()}. This method allows you to use a
different thread pool, if the cached thread pool provides the wrong
semantics or if you want to use a single thread pool for the whole app.

<p>
Note that calling this method will have <em>no effect</em> on any threads
started on the existing thread pool; they will run to completion in a
totally normal manner.