Description
I've been hitting Concurrent::RejectedExecutionError when running my test-stuite. It was ok with MRI, but switching to JRuby was the game-changer. It turns out there seems to be an at_exit trap that shuts down the Java thread pool. I've first tried to fix that using the same approach as in this test suite, reinitializing the Concurrent.configuration. However, there still was an issue with @root
variable in actor keeping the reference to an old thread pool via Delayed (
concurrent-ruby/lib/concurrent/actor.rb
Lines 42 to 46 in 124ea7e
So I needed to reinitialize this as well the hackish way:
What do you think about having set of helpers that helps with setting the testing environment and this kind of issues (I guess there might be more: we're not using all the concurrent-ruby features.)