-
Notifications
You must be signed in to change notification settings - Fork 417
Executor threads not being created as daemon #817
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
Labels
Comments
If I can get some help on this I'd be happy to put together a PR. Do I have the right places above? |
fzakaria
added a commit
to fzakaria/concurrent-ruby
that referenced
this issue
Jan 8, 2020
Introduce a ThreadFactory that will set `Thread#setDaemon` according to the _auto_terminate_ value. This makes the need for the `AtExit` functionality uneeded since all threads can now be started daemonized. Furthermore, the gross **hack** of `Configuration#disable_at_exit_handlers!` is especially not needed since this allows the JVM to properly terminate even with minitest. You can test this with: ``` ruby test/concurrent/executor/test_cached_thread_pool.rb ``` fixes ruby-concurrency#839 fixes ruby-concurrency#817
fzakaria
added a commit
to fzakaria/concurrent-ruby
that referenced
this issue
Jan 14, 2020
Introduce a ThreadFactory that will set `Thread#setDaemon` according to the _auto_terminate_ value. This makes the need for the `AtExit` functionality uneeded since all threads can now be started daemonized. Furthermore, the gross **hack** of `Configuration#disable_at_exit_handlers!` is especially not needed since this allows the JVM to properly terminate even with minitest. You can test this with: ``` ruby test/concurrent/executor/test_cached_thread_pool.rb ``` fixes ruby-concurrency#839 fixes ruby-concurrency#817
pitr-ch
pushed a commit
to fzakaria/concurrent-ruby
that referenced
this issue
Jan 19, 2020
Introduce a ThreadFactory that will set `Thread#setDaemon` according to the _auto_terminate_ value. This makes the need for the `AtExit` functionality uneeded since all threads can now be started daemonized. Furthermore, the gross **hack** of `Configuration#disable_at_exit_handlers!` is especially not needed since this allows the JVM to properly terminate even with minitest. You can test this with: ``` ruby test/concurrent/executor/test_cached_thread_pool.rb ``` fixes ruby-concurrency#839 fixes ruby-concurrency#817
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There appears to be an executor service somewhere in concurrent-ruby that's not marking the threads as "daemon" on JVM. As a result, this causes that executor to keep the process from terminating.
This issue has been affecting builds of JRuby for some time; the CRuby standard library test suite we run appears to trigger concurrent-ruby to create this executor, resulting in the entire suite hanging at the end when it should gracefully shut down.
jruby/jruby#5718 (comment)
I am not sure where the code is for launching such an executor...someone else might be able to find this quickly. I will try.
The text was updated successfully, but these errors were encountered: