Class: Thread

Inherits:
Object
  • Object
show all
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

Instance Method Details

#clear_execution_idObject



14
15
16
# File 'lib/rake/opt/parallel/patches/thread.rb', line 14

def clear_execution_id
  self['execution_id'] = nil
end

#execution_idObject



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_idObject



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