def burn_down_workers(signal)
      loop do
        check_for_expired_workers
        write_procline('shutdown')
        SIGNAL_QUEUE.clear

        break if :no_child == reap_workers(Process::WNOHANG)
        kill_all(signal)

        sleep 1 # Don't kill any more often than every 1s.
        yawn 5
      end
      # One last time.
      reap_workers
    end
def burn_down_workers(signal)
      loop do
        check_for_expired_workers
        write_procline('shutdown')
        SIGNAL_QUEUE.clear

        break if :no_child == reap_workers(Process::WNOHANG)
        kill_all(signal)

        sleep 1 # Don't kill any more often than every 1s.
        yawn 5
      end
      # One last time.
      reap_workers
    end
Private: make sure all the workers stop.

 Resque workers have gaps in their signal-handling ability.