Skip to content

Commit

Permalink
Update sequences.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
mensfeld authored Nov 22, 2022
1 parent d193c0e commit 97dda9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rom/factory/sequences.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ def self.[](relation)

# @api private
def initialize
@mutex = Mutex.new
reset
end

# @api private
def next(key)
registry[key] += 1
@mutex.synchronize do
registry[key] += 1
end
end

# @api private
Expand Down

0 comments on commit 97dda9a

Please sign in to comment.