lib/filestack/utils/utils.rb
# Creates a generator of part jobs
#
# @param [Array]     jobs      A list of file parts
#
# @return [Fiber]
Creates a generator of part jobs
Creates a generator of part jobs
def create_intelligent_generator(jobs)
    jobs_gen = jobs.lazy.each
    Fiber.new do
      (jobs.length-1).times do
        Fiber.yield jobs_gen.next
      end
      jobs_gen.next
    end
  end
def create_intelligent_generator ( jobs ) jobs_gen = jobs . lazy . each Fiber . new do ( jobs . length - 1 ) . times do Fiber . yield jobs_gen . next end jobs_gen . next end end
Creates a generator of part jobs
Creates a generator of part jobs
None
Fiber
jobs
<not_specific>
<not_specific>
jobs A list of file parts
jobs A list of file parts