Class: Thread

Inherits:
Object
  • Object
show all
Defined in:
lib/sapience/core_ext/thread.rb

Instance Method Summary collapse

Instance Method Details

#nameObject

Returns the name of the current thread Default:

String representation of this thread's object_id


7
8
9
# File 'lib/sapience/core_ext/thread.rb', line 7

def name
  @name ||= object_id.to_s
end

#name=(name) ⇒ Object

Set the name of this thread



12
13
14
# File 'lib/sapience/core_ext/thread.rb', line 12

def name=(name)
  @name = name.to_s
end