I am planning on using ActiveSupport::Notifications and have a question about threading. For the purposes of this question I am assuming config.threadsafe! is enabled.
Will a subscriber execute in the same thread as the code that caused it to be triggered or do they run in separate threads?
I would have thought that was easy to test. Currently everything happens on the thread triggering the event. There’s also code in rails (eg ActiveRecord’s logsubscriber) that use thread local variables in notification processing so I wouldn’t that would be changed in a hurry.