ruby-concurrency/concurrent-ruby

Document or improve global-pool's auto termination

pitr-ch opened this issue · 3 comments

If concurrent-ruby is used in tests of other project, the thread pools are terminated before the tests are executed. Reason is the order of at_exit callbacks, termination runs before the test run is executed.

This was part of my motivation for #199 - I hit exactly this with minitest/autorun, and it's much easier to spot if you get an exception by default.

It's easy to work around by setting Concurrent.configuration.auto_terminate = false in a minitest_helper.rb file.

the solution is partly also discussed in #248

Addressed in PR #255.