Using TPE w/ custom BlockingQueue and if RuntimeException happens in blocking BlockingQueue.take() method then this code

new ThreadPoolExecutor(1, 1, 0, TimeUnit.NANOSECONDS,
    new ArrayBlockingQueue<Runnable>(1) {
        public Runnable take() throws InterruptedException {
            throw new RuntimeException();
        }
    }
).prestartAllCoreThreads();

has an unbounded thread creation loop.

As a result there are many created unbounded threads in RUNNING state after printing stack trace to stderr by default UncaughtExceptionHandler. And these thread will be cleaned only when whole TPE finished.

Is this "Not an Issue"?

--
Lev

Reply via email to