class_docstr: Create a queue object with a given maximum size.
  
  If maxsize is <= 0, the queue size is infinite.
docstr: Indicate that a formerly enqueued task is complete.
  
  Used by Queue consumer threads.  For each get() used to fetch a task,
  a subsequent call to task_done() tells the queue that the processing
  on the task is complete.
  
  If a join() is currently blocking, it will resume when all items
  have been processed (meaning that a task_done() call was received
  for every item that had been put() into the queue).
  
  Raises a ValueError if called more times than there were items
  placed in the queue.
docstr_tok: ["Indicate","that","a","formerly","enqueued","task","is","complete",".","Used","by","Queue","consumer","threads",".","For","each","get","(",")","used","to","fetch","a","task",",","a","subsequent","call","to","task_done","(",")","tells","the","queue","that","the","processing","on","the","task","is","complete",".","If","a","join","(",")","is","currently","blocking",",","it","will","resume","when","all","items","have","been","processed","(","meaning","that","a","task_done","(",")","call","was","received","for","every","item","that","had","been","put","(",")","into","the","queue",")",".","Raises","a","ValueError","if","called","more","times","than","there","were","items","placed","in","the","queue","."]
code: def task_done(self):
      """Indicate that a formerly enqueued task is complete.
  
      Used by Queue consumer threads.  For each get() used to fetch a task,
      a subsequent call to task_done() tells the queue that the processing
      on the task is complete.
  
      If a join() is currently blocking, it will resume when all items
      have been processed (meaning that a task_done() call was received
      for every item that had been put() into the queue).
  
      Raises a ValueError if called more times than there were items
      placed in the queue.
      """
      with self.all_tasks_done:
          unfinished = self.unfinished_tasks - 1
          if unfinished <= 0:
              if unfinished < 0:
                  raise ValueError("task_done() called too many times")
              self.all_tasks_done.notify_all()
          self.unfinished_tasks = unfinished
  
imports: import threading
  import types
  from collections import deque
  from heapq import heappush, heappop
  from time import monotonic
label_desc: Use image node_id 2 for calling the Queue obj's underlying member method code with example usage: obj.task_done() without return types