Class: Ukiryu::ExecutionContext::ThreadLocal Private
- Inherits:
-
Object
- Object
- Ukiryu::ExecutionContext::ThreadLocal
- Defined in:
- lib/ukiryu/execution_context.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize ⇒ ThreadLocal
constructor
private
A new instance of ThreadLocal.
- #value ⇒ Object private
- #value=(val) ⇒ Object private
Constructor Details
#initialize ⇒ ThreadLocal
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ThreadLocal.
9 10 11 |
# File 'lib/ukiryu/execution_context.rb', line 9 def initialize @key = "__ukiryu_execution_context_#{object_id}__" end |
Instance Method Details
#value ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/ukiryu/execution_context.rb', line 13 def value Thread.current[@key] end |
#value=(val) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
17 18 19 |
# File 'lib/ukiryu/execution_context.rb', line 17 def value=(val) Thread.current[@key] = val end |