reevoo/sapience-rb

View on GitHub
lib/sapience/core_ext/thread.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
class Thread
  # Returns the name of the current thread
  # Default:
  #    String representation of this thread's object_id
  def name
    @name ||= object_id.to_s
  end

  # Set the name of this thread
  def name=(name)
    @name = name.to_s
  end
end