Content-Length: 5245 | pFad | http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Set.html

Class: Concurrent::Set — Concurrent Ruby

Class: Concurrent::Set

Inherits:
SetImplementation
  • Object
show all
Defined in:
lib/concurrent-ruby/concurrent/set.rb

Overview

Note:

a += b is not a thread-safe operation on Concurrent::Set. It reads Set a, then it creates new Concurrent::Set 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.

A thread-safe subclass of Set. This version locks against the object itself for every method call, ensuring only one thread can be reading or writing at a time. This includes iteration methods like #each.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Set.html

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy