module ActiveSupport::PerThreadRegistry

def self.extended(object)

def self.extended(object)
  ActiveSupport::Deprecation.warn(<<~MSG)
    ActiveSupport::PerThreadRegistry is deprecated and will be removed in Rails 7.1.
    Use `Module#thread_mattr_accessor` instead.
  MSG
  object.instance_variable_set :@per_thread_registry_key, object.name.freeze
end