Method: Concurrent::SettableStruct#select
- Defined in:
- lib/concurrent-ruby/concurrent/settable_struct.rb
#select {|value| ... } ⇒ Array
Yields each member value from the struct to the block and returns an Array containing the member values from the struct for which the given block returns a true value (equivalent to ‘Enumerable#select`).
67 68 69 70 |
# File 'lib/concurrent-ruby/concurrent/settable_struct.rb', line 67 def select(&block) return enum_for(:select) unless block_given? synchronize { ns_select(&block) } end |