docstr: Block until all workers are terminated.
docstr_tok: ["Block","until","all","workers","are","terminated","."]
code: def join(self):
      """Block until all workers are terminated."""
      for w in self._workers:
          if w.is_alive():
              w.join()
  
      if self._profiling_enabled:
          # If we have profiling set, collect stats and print them
          stats = None
          for w in self._workers:
              if stats:
                  stats.add(w.prof)
              else:
                  stats = pstats.Stats(w.prof)
          stats.sort_stats("cumulative").print_stats()
  
imports: import cProfile
  import pstats
  import random
  import sys
  from threading import Thread, Event
  from traceback import format_exc
  from six.moves import queue
  from petastorm.workers_pool import EmptyResultError, VentilatedItemProcessedMessage
label_desc: Use image node_id 6 for calling the ThreadPool obj's underlying member method code with example usage: obj.join() without return types