code: async def join(self):
          
          while True:
              with self._parent._sync_mutex:
                  if self._parent._unfinished_tasks == 0:
                      break
              await self._parent._finished.wait()
docs: Block until all items in the queue have been gotten and processed.
  
          The count of unfinished tasks goes up whenever an item is added to the
          queue. The count goes down whenever a consumer calls task_done() to
          indicate that the item was retrieved and all work on it is complete.
          When the count of unfinished tasks drops to zero, join() unblocks.