Skip to content

Commit

Permalink
Merge pull request #47736 from rails/thread-safety
Browse files Browse the repository at this point in the history
Fix Fanout thread safety
  • Loading branch information
rafaelfranca committed Mar 28, 2023
2 parents e6884f8 + ea2870c commit 689fafa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activesupport/lib/active_support/notifications/fanout.rb
Expand Up @@ -48,7 +48,7 @@ class Fanout
include Mutex_m

def initialize
@string_subscribers = Hash.new { |h, k| h[k] = [] }
@string_subscribers = Concurrent::Map.new { |h, k| h[k] = [] }
@other_subscribers = []
@all_listeners_for = Concurrent::Map.new
@groups_for = Concurrent::Map.new
Expand Down

0 comments on commit 689fafa

Please sign in to comment.