You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: async_dataloader.rb
    path of file: ./repos/graphql-ruby/lib/graphql/dataloader
    
    the code of the file until where you have to start completion: # frozen_string_literal: true
module GraphQL
  class Dataloader
    class AsyncDataloader < Dataloader
      def yield
        if (condition = Thread.current[:graphql_dataloader_next_tick])
          condition.wait
        else
          Fiber.yield
        end
        nil
      end

      def run
        job_fibers = []
        next_job_fibers = []
        source_tasks = []
        next_source_
    
      def run
        job_fibers = []
        next_job_fibers = []
        source_tasks = []
        next_source_tasks = []
        first_pass = true
        sources_condition = Async::Condition.new
        manager = spawn_fiber do
          while first_pass || job_fibers.any?
            first_pass = false

            while (f = (job_fibers.shift || spawn_job_fiber))
              if f.alive?
                finished = run_fiber(f)
                if !finished
                  next_job_fibers << f
                end
              end