class_docstr: Start some threads or processes before training.
docstr: Args:
      startable (list): list of processes or threads which have ``start()`` method.
          Can also be a single instance of process of thread.
      stop_at_last (bool): whether to stop the processes or threads
          after training. It will use :meth:`Process.terminate()` or
          :meth:`StoppableThread.stop()`, but will do nothing on normal
          ``threading.Thread`` or other startable objects.
code: def __init__(self, startable, stop_at_last=True):
      """
      Args:
          startable (list): list of processes or threads which have ``start()`` method.
              Can also be a single instance of process of thread.
          stop_at_last (bool): whether to stop the processes or threads
              after training. It will use :meth:`Process.terminate()` or
              :meth:`StoppableThread.stop()`, but will do nothing on normal
              ``threading.Thread`` or other startable objects.
      """
      if not isinstance(startable, list):
          startable = [startable]
      self._procs_threads = startable
      self._stop_at_last = stop_at_last
  
file_path: tensorpack/tensorpack/callbacks/concurrency.py
imports: import multiprocessing
  from ..utils import logger
  from ..utils.concurrency import StoppableThread, start_proc_mask_signal
  from .base import Callback
label_desc: Use image node_id 1 to create a new StartProcOrThread object from inherited base classes: Callback with example: obj = StartProcOrThread(startable, stop_at_last)