Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361655 - ExecutorThreadPool.isLowOnThreads() returns wrong value
Summary: ExecutorThreadPool.isLowOnThreads() returns wrong value
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: 7.5.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 7.5.x   Edit
Assignee: Simone Bordet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-21 10:00 EDT by Simone Bordet CLA
Modified: 2011-10-21 10:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Bordet CLA 2011-10-21 10:00:54 EDT
The implementation of ExecutorThreadPool.isLowOnThreads() compares the number of tasks ever submitted to the pool with the maximum pool size, which is wrong.

After some time, the number of tasks ever submitted will overgrow the maximum pool size, making the pool look like is always low on threads.
Comment 1 Simone Bordet CLA 2011-10-21 10:27:32 EDT
Fixed so that ExecutorThreadPool.isLowOnThreads() now implements the same logic as QueuedThreadPool.isLowOnThreads().