-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motivated by "The load balancing issue in Poco::ActiveThreadPool" #4544 #4548
base: main
Are you sure you want to change the base?
Conversation
…project#4544" Optimization allows redistribute tasks to the idle threads
Thanks for the contribution. IMO partial refactoring of ActiveThreadPool (and related classes) to have a single task queue in the pool where the threads take the work from would automatically create optimal load-balancing and simplify the implementation at the same time. |
Hi! |
This change appears to fail with the Thread Sanitizer. The actual log has much more in it https://github.com/pocoproject/poco/actions/runs/8982526627/job/24670333088?pr=4548.
|
try increase a number of tasks and remove sleep from short-task for tests
@matejk |
Optimization allows redistribute tasks to the idle threads
When ActiveThread dequeue next Runnable, it checks is optimization is true and if yes it try to find idle thread and resend task
By default optimization is false