Removes all pending Jobs from the queue and return them in a list. This
    method does **no**t call #Job.cancel() on any of the jobs. If you want
    that, use #cancel_all() or call it manually.

def clear(self):
    """
    Removes all pending Jobs from the queue and return them in a list. This
    method does **no**t call #Job.cancel() on any of the jobs. If you want
    that, use #cancel_all() or call it manually.
    """

    with synchronized(self.__queue):
      jobs = self.__queue.snapshot()
      self.__queue.clear()
    return jobs