lib/lucid_async/pool.rb
# Execute a given block for each element in a collection asynchronously.
# Blocks until all threads have completed and returns +false+ if any
# thread returns a falsey value.
#
Execute a given block for each element in a collection asynchronously.
Blocks until all threads have completed and returns +false+ if any
thread returns a falsey value.
Execute a given block for each element in a collection asynchronously . Blocks until all threads have completed and returns + false + if any thread returns a falsey value .
def each_of( collection, task = nil, &block )
      block = _block_arg( task, block )
      t = collection.each_with_index.map do |*args|
        process { block.call( *args ) }
      end
      _wait_for( t )
    end
def each_of ( collection , task = nil , & block ) block = _block_arg ( task , block ) t = collection . each_with_index . map do | * args | process { block . call ( * args ) } end _wait_for ( t ) end
Execute a given block for each element in a collection asynchronously.
Execute a given block for each element in a collection asynchronously .
collection
task
block