Class AutoCloseableExecutorService

    • Constructor Detail

      • AutoCloseableExecutorService

        public AutoCloseableExecutorService​(int numThreads)
        A ThreadPoolExecutor that can be used in a try-with-resources block.
        Parameters:
        numThreads - The number of threads to allocate.
    • Method Detail

      • close

        public void close()
        Shut down thread pool on close().
        Specified by:
        close in interface AutoCloseable