eatbookexamples icon indicating copy to clipboard operation
eatbookexamples copied to clipboard

Page 146: The danger of zero core threads

Open xinghui opened this issue 9 years ago • 0 comments

ThreadPoolExecutor executor = new ThreadPoolExecutor(
                0,
                N * 2,
                60L,
                TimeUnit.SECONDS,
                new ArrayBlockingQueue<Runnable>(10)
);

When I execute less than 10 Runnable, the task always be executed.

This example should be wrong.

xinghui avatar Dec 05 '15 09:12 xinghui