Skip to content
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

Fix DaemonThreadFactory - reuse single Java thread factory #1009

Conversation

obulkin
Copy link
Contributor

@obulkin obulkin commented Aug 28, 2023

This PR addresses the issue outlined here: #1008

* Move defaultThreadFactory call to DaemonThreadFactory#initialize and store
resulting factory in @java_thread_factory
* In DaemonThreadFactory#newThread, use stored factory to generate new threads
instead of creating a new factory each time
@obulkin obulkin force-pushed the fix-Java-thread-factory-usage-in-DaemonThreadFactory branch from 660f7db to 2e8d0ae Compare September 6, 2023 20:53
Copy link
Collaborator

@eregon eregon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, and sorry for the late review

@eregon eregon merged commit 42d2766 into ruby-concurrency:master Oct 21, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants