Skip to content

Commit

Permalink
add threading comment
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Jun 1, 2013
1 parent 486b5fa commit 993387d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/mustermann/equality_map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def initialize
def fetch(*key)
identity = @keys[key.hash]
key = identity == key ? identity : key

# it is ok that this is not thread-safe, worst case it has double cost in
# generating, object equality is not guaranteed anyways
@map[key] ||= track(key, yield)
end

Expand Down

0 comments on commit 993387d

Please sign in to comment.