-
Notifications
You must be signed in to change notification settings - Fork 416
Thread Pool Updates #255
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
Thread Pool Updates #255
Conversation
7479b27 to
a68cc69
Compare
|
ALL: With the exception of documentation, I believe this PR to be complete. I plan to merge it Tuesday night after work. All feedback is welcome. |
|
@jdantonio I was on PTO for a week so I am still catching up on the conversations. Could you give me little more time to go over it? |
|
@pitr-ch Absolutely! |
* Renamed #set_shutdown_hook to #enable_at_exit_handler! * Moved #enable_at_exit_handler! to the Executor module * Adde call to #enable_at_exit_handler! to Ruby thread pools
* Created new global pools within the Concurrent namespace * Renamed global task pool to 'fast executor' * Renamed global operations pool to 'io executor' * Adjusted global thread pool attributes * Deprecated old method calls - Global thread pool getters get new thread pools - Thread pool factories create pools with new attributes - Deprecation warnings for all old functions * Auto terminate feature has more descriptive name * Updated test helper for resetting global thread pools * Updated tests that changed the global thread pools * Commented out a problematic actor test
555c90a to
8c77ef8
Compare
Global configuration and thread pool updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the --format documentation was there to see the last test where it was hanging. Is there another way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there's another way, but --format documentation has been in .travis.yml since June of last year. I only removed it a couple of weeks ago--then immediately added it back when we had a hanging test. I think we should keep it for now. Once we stabilize our tests we can remove it, but the full output is pretty valuable right now.
|
Thanks for all the work on executors! And sorry that it took me so long to get to it :/ |
Addresses #248, #227, and #149.
Changelog
at_exithandler to Ruby thread pools (already in Java thread pools)ObjectSpaceObjectSpaceby default so that handler stores the object reference:stop_on_exitoption to thread pools to enable/disableat_exithandler:executoroption syntax for all abstractions which support this optionExecutor#auto_terminate?predicate method (for thread pools)at_exithandler toTimerSetConcurrent::ConfigurationtoConcurrentActorcausing it to prematurely warm global thread pools on gem loadRejectedExecutionErrorbug when running with minitest/autorun via JRubyLazyReference, a simpler and faster varition ofDelayDelaywithLazyReferenceConcurrentnamespace and refactored the codeTo-Do
From #248
at_exithandlerat_exithandlerauto_shutdown?(or similarly named) predicate method to our Java-backed thread pools that indicates whether theat_exithandler has been setat_exitbehavior as the Java-backed thread poolsat_exithandler ever exists for each global thread poolat_exithandlers[ ] Let theat_exithandlers created within the global config handle the global thread poolsauto_terminatefeaturerespond_to?checks[ ] Ensure proper handing ofat_exithandler creation for all thread pools automatically created within the global config[ ] Ensure proper handling ofat_exitwhen the user explicitly sets a global thread poolConfiguration.shutdown_global_thread_pools(or similarly named) methodat_exithandlers the ability to explicitly shutdown the global thread pools[ ] It should include arequire 'concurrent/autotest'feature for simple setupat_exithandlers from being created for all thread pools, regardless of how they are createdFrom #149
[ ] add more global executors like an immediate executorConcurrentspace[ ] to also handle agent two pools