def ask(op, *args)
      if :add == op && 0 < @max_job_count && (@work_queue.size() + @queue.size()) >= @max_job_count
        unless 0.0 >= @job_timeout
          @add_thread = Thread.current
          give_up_at = Time.now + @job_timeout
          until Time.now > give_up_at || (@work_queue.size() + @queue.size()) < @max_job_count
            sleep(@job_timeout)
          end
          @add_thread = nil
        end
        raise BusyError.new() unless @work_queue.size() < @max_job_count
      end
      super
    end
def ask(op, *args)
      if :add == op && 0 < @max_job_count && (@work_queue.size() + @queue.size()) >= @max_job_count
        unless 0.0 >= @job_timeout
          @add_thread = Thread.current
          give_up_at = Time.now + @job_timeout
          until Time.now > give_up_at || (@work_queue.size() + @queue.size()) < @max_job_count
            sleep(@job_timeout)
          end
          @add_thread = nil
        end
        raise BusyError.new() unless @work_queue.size() < @max_job_count
      end
      super
    end
Verifies that additional jobs can be added to the work queue before
 allowing an {#add}() to be called.
 @see Actor#ask