Skip to content

Commit

Permalink
Update Set doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pitr-ch committed Feb 21, 2018
1 parent cc54be4 commit cef13b9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/concurrent/set.rb
Expand Up @@ -16,9 +16,12 @@ module Concurrent
#
# @note `a += b` is **not** a **thread-safe** operation on
# `Concurrent::Set`. It reads Set `a`, then it creates new `Concurrent::Set`
# which is concatenation of `a` and `b`, then it writes the concatenation to `a`.
# which is union of `a` and `b`, then it writes the union to `a`.
# The read and write are independent operations they do not form a single atomic
# operation therefore when two `+=` operations are executed concurrently updates
# may be lost. Use `#merge` instead.
#
# @see http://ruby-doc.org/stdlib-2.4.0/libdoc/set/rdoc/Set.html Ruby standard library `Set`
class Set < ::Set;
end

Expand Down

0 comments on commit cef13b9

Please sign in to comment.