class_docstr: **Deprecated**. Load batches in the background.
  
  Deprecated. Use ``imgaug.multicore.Pool`` instead.
  
  Loaded batches can be accesses using :attr:`imgaug.BatchLoader.queue`.
  
  Parameters
  ----------
  load_batch_func : callable or generator
      Generator or generator function (i.e. function that yields Batch
      objects) or a function that returns a list of Batch objects.
      Background loading automatically stops when the last batch was yielded
      or the last batch in the list was reached.
  
  queue_size : int, optional
      Maximum number of batches to store in the queue. May be set higher
      for small images and/or small batches.
  
  nb_workers : int, optional
      Number of workers to run in the background.
  
  threaded : bool, optional
      Whether to run the background processes using threads (True) or full
      processes (False).
docstr: Stop all workers.
docstr_tok: ["Stop","all","workers","."]
code: def terminate(self):
      """Stop all workers."""
      # pylint: disable=protected-access
      if not self.join_signal.is_set():
          self.join_signal.set()
      # give minimal time to put generated batches in queue and gracefully
      # shut down
      time.sleep(0.01)
  
      if self.main_worker_thread.is_alive():
          self.main_worker_thread.join()
  
      if self.threaded:
          for worker in self.workers:
              if worker.is_alive():
                  worker.join()
      else:
          for worker in self.workers:
              if worker.is_alive():
                  worker.terminate()
                  worker.join()
  
          # wait until all workers are fully terminated
          while not self.all_finished():
              time.sleep(0.001)
  
      # empty queue until at least one element can be added and place None
      # as signal that BL finished
      if self.queue.full():
          self.queue.get()
      self.queue.put(pickle.dumps(None, protocol=-1))
      time.sleep(0.01)
  
      # clean the queue, this reportedly prevents hanging threads
      while True:
          try:
              self._queue_internal.get(timeout=0.005)
          except QueueEmpty:
              break
  
      if not self._queue_internal._closed:
          self._queue_internal.close()
      if not self.queue._closed:
          self.queue.close()
      self._queue_internal.join_thread()
      self.queue.join_thread()
      time.sleep(0.025)
  
imports: from __future__ import print_function, division, absolute_import
  import sys
  import multiprocessing
  import threading
  import traceback
  import time
  import random
  import platform
  import numpy
  import cv2
  import imgaug.imgaug
  import imgaug.random
  from imgaug.augmentables.batches import Batch, UnnormalizedBatch
label_desc: Use image node_id 6 for calling the BatchLoader obj's underlying member method code with example usage: obj.terminate() without return types