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

Improve the ThreadGroup of the Janitor #87

Merged
merged 1 commit into from
Feb 26, 2020

Conversation

SalusaSecondus
Copy link
Contributor

@SalusaSecondus SalusaSecondus commented Feb 25, 2020

Issue #, if available: #86

Description of changes:
This moves creation of the Janitor thread to the Loader which causes it to exist in a more logical ThreadGroup rather than associated with whatever ThreadGroup first needs to use a native resource.

When Java threads are created they (by default) belong to the ThreadGroup of the creating thread. This can cause problems for ACCP and our customers if the ThreadGroup belongs to a tracked thread pool or similar structure. Previously the Janitor (and associated cleaning threads) was created lazily upon first use. This meant that its thread(s) would be associated with whatever customer ThreadGroup first used aspects of ACCP. The change in this PR moves Janitor creation to our main installation/loading logic which will generally be done by threads/ThreadGroups responsible for general system startup and running and thus more appropriate to own the resulting Janitor cleaning thread.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@SalusaSecondus SalusaSecondus merged commit 5e9cfc5 into corretto:develop Feb 26, 2020
@SalusaSecondus SalusaSecondus deleted the move_janitor_thread branch February 26, 2020 00:15
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