Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
-
Description
LinkedBlockingQueue is usually used in ThreadPoolExecutor. It allows the thread pool not to be blocked if the number of running threads in the pool is less than the max pool size and the queue is not full.
But when the core pool size of ThreadPoolExecutor is different from the max pool size, the things don't go as expected. When the number of running threads is the same with the core size, more requests of executions are added into the LinkedBlockingQueue. And the requests can be executed again only when LinkedBlockingQueue is full or some of running threads are finished.
Thus it is better to use the same value for the core and max pool size when the LinkedBlockingQueue is used.
Attachments
Attachments
Issue Links
- relates to
-
HBASE-14478 A ThreadPoolExecutor with a LinkedBlockingQueue cannot execute tasks concurrently
- Closed