Align Java Executor Service behavior for shuttingdown?, shutdown?#1042
Align Java Executor Service behavior for shuttingdown?, shutdown?#1042eregon merged 1 commit intoruby-concurrency:masterfrom
shuttingdown?, shutdown?#1042Conversation
a7d609b to
6f64bb2
Compare
lib/concurrent-ruby/concurrent/executor/java_executor_service.rb
Outdated
Show resolved
Hide resolved
93195e0 to
e41c843
Compare
|
|
Could you make a PR to add timeouts of 10 minutes (which looks enough from looking at previous runs) for all CI workflows? |
|
Can you reproduce the issue locally with TimerSet on JRuby? |
Co-authored-by: Benoit Daloze <eregontp@gmail.com>
e41c843 to
0da4582
Compare
shuttingdown? shutdown? and killshuttingdown? shutdown?
shuttingdown? shutdown?shuttingdown?, shutdown?
|
@eregon Thank you for the help! 🙇🏻
I feel mixed. A lot of Concurrent Ruby is inspired by Java objects, so it seems like it would be better (simpler? more performant? less potential for bikeshedding or 2nd-systeming them?) to lightly wrap them rather than use a Ruby implementation. I have similar vague feelings about Native C Extensions too; which to chit-chat also makes me wonder if YJIT would make that less worthwhile. |
The concurrent-ruby C ext is only for atomic variables. |
Fixes #1041
shuttingdown?now usesisShutdown && !isTerminatedshutdown?now accurately represents when all tasks have terminatedExtractedkillnow waits for all tasks to terminate (it waits indefinitely; I'm not sure if it's possible for that to hang on Java)#killchange toThreadPoolExecutor#killwillwait_for_terminationin JRuby; ensureTimerSettimer thread shuts down cleanly #1044