Class: Thread
- Inherits:
-
Object
- Object
- Thread
- Defined in:
- lib/rake/opt/parallel/patches/thread.rb
Overview
Thread class override Adds execution_id helpers
Constant Summary collapse
- EXECUTION_ID_LENGTH =
16
Instance Method Summary collapse
- #clear_execution_id ⇒ Object
- #execution_id ⇒ Object
- #execution_id=(manual_id) ⇒ Object
- #reset_execution_id ⇒ Object
Instance Method Details
#clear_execution_id ⇒ Object
14 15 16 |
# File 'lib/rake/opt/parallel/patches/thread.rb', line 14 def clear_execution_id self['execution_id'] = nil end |
#execution_id ⇒ Object
6 7 8 |
# File 'lib/rake/opt/parallel/patches/thread.rb', line 6 def execution_id return self['execution_id'] end |
#execution_id=(manual_id) ⇒ Object
10 11 12 |
# File 'lib/rake/opt/parallel/patches/thread.rb', line 10 def execution_id=(manual_id) self['execution_id'] = manual_id end |
#reset_execution_id ⇒ Object
18 19 20 |
# File 'lib/rake/opt/parallel/patches/thread.rb', line 18 def reset_execution_id self['execution_id'] = rand(36**EXECUTION_ID_LENGTH).to_s(36) end |