Skip to content

Commit

Permalink
Make users buffer fully thread-safe
Browse files Browse the repository at this point in the history
Under intense threading usage, the `@@users` buffer will not be thread-safe fully. Details here:

ref ruby-concurrency/concurrent-ruby#970
  • Loading branch information
mensfeld authored Nov 21, 2022
1 parent 384a0e5 commit 67a92c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/board/agenda/daemon/channel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class Channel
@@sockets = Concurrent::Map.new
@@users = Concurrent::Map.new {|map,key| map[key]=[]}
@@users = Concurrent::Map.new {|map,key| map.compute_if_absent(key) { [] } }

begin
FOUNDATION_BOARD = ASF::SVN['foundation_board']
Expand Down

0 comments on commit 67a92c1

Please sign in to comment.