def kill
      mutex.synchronize do
        break if shutdown?
        stop_event.set
        kill_execution
        stopped_event.set
      end
      true
    end
def kill
      mutex.synchronize do
        break if shutdown?
        stop_event.set
        kill_execution
        stopped_event.set
      end
      true
    end
Begin an immediate shutdown. In-progress tasks will be allowed to complete
 but enqueued tasks will be dismissed and no new tasks will be accepted.
 Has no additional effect if the thread pool is not running.