Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/xccache/core/parallel.rb
Instance Method Summary collapse
Instance Method Details
#parallel_map(options = {}) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/xccache/core/parallel.rb', line 4 def parallel_map( = {}) # By default, use in_threads (IO-bound tasks) default = {} default[:in_threads] = Parallel.processor_count unless .key?(:in_processes) Parallel.map(self, { **default, ** }) { |x| yield x if block_given? } end |