ScriptingContainer, Ruby Runtime, and Variable Map

(Note on cross-meaning: this question was also posted on JRuby ( jruby@ruby-lang.org ) on December 20 and on the JRuby Forum on January 2, but has no answer yet).

This question is about understanding the impact of the LocalContextScope parameter in the presence of multithreading.

We can find a recipe in the JRuby Wiki that helps you choose the best value for the LocalContextScope parameter. This page explains that this control option, whether it be ScriptingContainer and / or Ruby Runtime and / or the Map variable, is shared between threads. However, I would like to get a somewhat deeper understanding of this issue, in particular, which part of the "system" is implemented, in which one of these three components.

As a concrete example: when I create global variables in Ruby or new classes or functions and variables in a top-level context, do they belong to the ScriptingContainer, at run time, or to a variable map? If without knowing this, I do not know which LocalContextScope I should use.

+7
jruby
source share

No one has answered this question yet.

See related questions:

131
JRuby on Rails vs Ruby on Rails, what's the difference?
79
How to make JRuby 1.6 the default for Ruby 1.9?
7
Can you use gems when you run a Ruby script in the built-in JRuby?
3
JRuby: Documentation of mappings / conversions between Java / Ruby types / classes?
2
Calling Ruby Method from Java
one
Same process id for exec in ruby ​​script
0
AST stays at runtime when jrubyc compilation was used?
0
What type of ruby ​​maps to java.io.File in jruby?
0
Switching from Ruby to JRuby at runtime
0
JRuby + Java: how to find my locally installed gems in my bank

All Articles