lib/lucid_async/task.rb
# Create a duplicate of this task for each element in a collection and
# process each easynchronously. Blocks until all threads have completed
# and returns +false+ if any thread returns a falsey value.
#
Create a duplicate of this task for each element in a collection and
process each easynchronously. Blocks until all threads have completed
and returns +false+ if any thread returns a falsey value.
Create a duplicate of this task for each element in a collection and process each easynchronously . Blocks until all threads have completed and returns + false + if any thread returns a falsey value .
def each_of( collection, *args, &callback )
      threads = collection.each_with_index.map do |*loop_args|
        self.dup.process *( loop_args + args ), &callback
      end
      _wait_for( threads )
    end
def each_of ( collection , * args , & callback ) threads = collection . each_with_index . map do | * loop_args | self . dup . process * ( loop_args + args ) , & callback end _wait_for ( threads ) end
Create a duplicate of this task for each element in a collection and
process each easynchronously.
Create a duplicate of this task for each element in a collection and process each easynchronously .
collection
args
callback