Class: Thread
- Defined in:
- activesupport/lib/active_support/core_ext/thread.rb
Constant Summary collapse
- LOCK =
Mutex.new
Instance Method Summary collapse
- #freeze ⇒ Object
- #thread_variable?(key) ⇒ Boolean
- #thread_variable_get(key) ⇒ Object
- #thread_variable_set(key, value) ⇒ Object
- #thread_variables ⇒ Object
Instance Method Details
#freeze ⇒ Object
65 66 67 68 |
# File 'activesupport/lib/active_support/core_ext/thread.rb', line 65 def freeze _locals.freeze super end |
#thread_variable?(key) ⇒ Boolean
61 62 63 |
# File 'activesupport/lib/active_support/core_ext/thread.rb', line 61 def thread_variable?(key) _locals.has_key?(key.to_sym) end |
#thread_variable_get(key) ⇒ Object
25 26 27 |
# File 'activesupport/lib/active_support/core_ext/thread.rb', line 25 def thread_variable_get(key) _locals[key.to_sym] end |
#thread_variable_set(key, value) ⇒ Object
32 33 34 |
# File 'activesupport/lib/active_support/core_ext/thread.rb', line 32 def thread_variable_set(key, value) _locals[key.to_sym] = value end |
#thread_variables ⇒ Object
47 48 49 |
# File 'activesupport/lib/active_support/core_ext/thread.rb', line 47 def thread_variables _locals.keys end |