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

Projects
None yet
3 participants
@headius
Copy link
Member

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.

@headius headius added this to the JRuby 9.2.1.0 milestone Oct 30, 2018

@headius headius requested review from kares and enebo Oct 30, 2018

Clear references to threads and thread contexts on teardown.
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.

@headius headius force-pushed the headius:clear_thread_objects branch from 58385cc to 9f72b0c Oct 30, 2018

@headius

This comment has been minimized.

Copy link
Member Author

headius commented Oct 30, 2018

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

@kares

kares approved these changes Oct 31, 2018

Copy link
Member

kares left a comment

looking good.

@enebo

enebo approved these changes Oct 31, 2018

@enebo enebo merged commit dc9cb9f into jruby:master Oct 31, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.