-
Notifications
You must be signed in to change notification settings - Fork 419
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
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.
@@ -26,4 +26,4 @@ matrix: | |||
- rvm: jruby-head | |||
- rvm: 1.9.3 | |||
|
|||
script: "rake compile && bundle exec rspec --color --backtrace --tag ~unfinished --seed 1 --format documentation ./spec" | |||
script: "rake compile && bundle exec rspec --color --backtrace --tag ~unfinished --seed 1 ./spec" |
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_exit
handler to Ruby thread pools (already in Java thread pools)ObjectSpace
ObjectSpace
by default so that handler stores the object reference:stop_on_exit
option to thread pools to enable/disableat_exit
handler:executor
option syntax for all abstractions which support this optionExecutor#auto_terminate?
predicate method (for thread pools)at_exit
handler toTimerSet
Concurrent::Configuration
toConcurrent
Actor
causing it to prematurely warm global thread pools on gem loadRejectedExecutionError
bug when running with minitest/autorun via JRubyLazyReference
, a simpler and faster varition ofDelay
Delay
withLazyReference
Concurrent
namespace and refactored the codeTo-Do
From #248
at_exit
handlerat_exit
handlerauto_shutdown?
(or similarly named) predicate method to our Java-backed thread pools that indicates whether theat_exit
handler has been setat_exit
behavior as the Java-backed thread poolsat_exit
handler ever exists for each global thread poolat_exit
handlers[ ] Let theat_exit
handlers created within the global config handle the global thread poolsauto_terminate
featurerespond_to?
checks[ ] Ensure proper handing ofat_exit
handler creation for all thread pools automatically created within the global config[ ] Ensure proper handling ofat_exit
when the user explicitly sets a global thread poolConfiguration.shutdown_global_thread_pools
(or similarly named) methodat_exit
handlers the ability to explicitly shutdown the global thread pools[ ] It should include arequire 'concurrent/autotest'
feature for simple setupat_exit
handlers from being created for all thread pools, regardless of how they are createdFrom #149
[ ] add more global executors like an immediate executorConcurrent
space[ ] to also handle agent two pools