code: def clear(self):
      
  
      with synchronized(self.__queue):
        jobs = self.__queue.snapshot()
        self.__queue.clear()
      return jobs
docs: 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.