Sha256: 35aba267f68afa99881e8b42c220877f39a2fb2ad5859d0ca03d227a10a34169
Contents?: true
Size: 699 Bytes
Versions: 26
Compression:
Stored size: 699 Bytes
Contents
class Thread undef :name if method_defined? :name undef :name= if method_defined? :name= # Returns the name of the current thread # Default: # JRuby: The underlying Java thread name # Other: String representation of this thread's object_id if defined? JRuby def name @name ||= JRuby.reference(self).native_thread.name end else def name @name ||= object_id.to_s end end # Set the name of this thread # On JRuby it also sets the underlying Java Thread name if defined? JRuby def name=(name) JRuby.reference(self).native_thread.name = @name = name.to_s end else def name=(name) @name = name.to_s end end end
Version data entries
26 entries across 26 versions & 1 rubygems