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

Clear references to threads and thread contexts on teardown. #5390

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

headius
Copy link
Member

@headius headius commented Oct 30, 2018

This change clears the following on JRuby runtime teardown:

  • The thread-local context reference in ThreadService
    (dereferenced entirely)
  • The mainContext reference in ThreadService
  • The mapping from native threads to RubyThread instances.

This should clear all JRuby-specific runtime data attached to
both Ruby and adopted Java threads.

Fixes #3313.
Supersedes #3316.

This change clears the following on JRuby runtime teardown:

* The thread-local context reference in ThreadService
  (dereferenced entirely)
* The mainContext reference in ThreadService
* The mapping from native threads to RubyThread instances.

This should clear all JRuby-specific runtime data attached to
both Ruby and adopted Java threads.

Fixes jruby#3313.
Supersedes jruby#3316.
@headius
Copy link
Member Author

headius commented Oct 30, 2018

Re-pushed with a tweak to allow profiling to dump before clearing thread references.

Copy link
Member

@kares kares left a comment

Choose a reason for hiding this comment

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

looking good.

@enebo enebo merged commit dc9cb9f into jruby:master Oct 31, 2018
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.

None yet

3 participants