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).
code: def __init__(
      self, load_batch_func, queue_size=50, nb_workers=1, threaded=True
  ):
      assert queue_size >= 2, (
          "Queue size for BatchLoader must be at least 2, "
          "got %d." % (queue_size,)
      )
      assert nb_workers >= 1, (
          "Number of workers for BatchLoader must be at least 1, "
          "got %d" % (nb_workers,)
      )
      self._queue_internal = multiprocessing.Queue(queue_size // 2)
      self.queue = multiprocessing.Queue(queue_size // 2)
      self.join_signal = multiprocessing.Event()
      self.workers = []
      self.threaded = threaded
      seeds = iarandom.get_global_rng().generate_seeds_(nb_workers)
      for i in range(nb_workers):
          if threaded:
              worker = threading.Thread(
                  target=self._load_batches,
                  args=(
                      load_batch_func,
                      self._queue_internal,
                      self.join_signal,
                      None,
                  ),
              )
          else:
              worker = multiprocessing.Process(
                  target=self._load_batches,
                  args=(
                      load_batch_func,
                      self._queue_internal,
                      self.join_signal,
                      seeds[i],
                  ),
              )
          worker.daemon = True
          worker.start()
          self.workers.append(worker)
  
      self.main_worker_thread = threading.Thread(
          target=self._main_worker, args=()
      )
      self.main_worker_thread.daemon = True
      self.main_worker_thread.start()
  
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 1 to create a new BatchLoader object from inherited base classes: object with example: obj = BatchLoader(load_batch_func, queue_size, nb_workers, threaded)