lib/ active_support/ core_ext/ module/ attribute_accessors_per_thread.rb
Attribute Accessors per Thread
Extends the module object with class/module and instance accessors for class/module attributes, just like the native attr* accessors for instance attributes, but does so on a per-thread basis.
So the values are scoped within the Thread.current space under the class name of the module.
Note that it can also be scoped per-fiber if
Rails.application.config.active_support.isolation_level is set to