code: def do_shutdown (self):
          
          with self.mutex:
              unfinished = self.unfinished_tasks - len(self.queue)
              self.queue.clear()
              if unfinished <= 0:
                  if unfinished < 0:
                      raise ValueError('shutdown is in error')
                  self.all_tasks_done.notifyAll()
              self.unfinished_tasks = unfinished
              self.shutdown = True
docs: Shutdown the queue by not accepting any more URLs.