class method
self.record_subscriptions
Ruby on Rails edge
Since edge Private — implementation detail, not part of the public APISignature
self.record_subscriptions()
Snapshot subscriptions so a Ractor can restore them onto its own notifier. Skipped for notifiers that don’t opt into the protocol. Only the main Ractor records: non-main Ractors subscribe onto their own Ractor-local notifier.
Source
# File activesupport/lib/active_support/notifications.rb, line 359
def record_subscriptions
return unless ActiveSupport::Ractors.main?
return unless notifier.respond_to?(:to_ractor_snapshot)
self.notifier_subscriptions = ActiveSupport::Ractors.try_make_shareable(
notifier.to_ractor_snapshot, copy: true
)
end
Defined in activesupport/lib/active_support/notifications.rb line 359
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Notifications