class_docstr: A portable implementation of multiprocessing.Queue.
  
  Because of multithreading / multiprocessing semantics, Queue.qsize() may
  raise the NotImplementedError exception on Unix platforms like Mac OS X
  where sem_getvalue() is not implemented. This subclass addresses this
  problem by using a synchronized shared counter (initialized to zero) and
  increasing / decreasing its value every time the put() and get() methods
  are called, respectively. This not only prevents NotImplementedError from
  being raised, but also allows us to implement a reliable version of both
  qsize() and empty().
class_docstr_tok: ["A","portable","implementation","of","multiprocessing.Queue",".","Because","of","multithreading","\/","multiprocessing","semantics",",","Queue.qsize","(",")","may","raise","the","NotImplementedError","exception","on","Unix","platforms","like","Mac","OS","X","where","sem_getvalue","(",")","is","not","implemented",".","This","subclass","addresses","this","problem","by","using","a","synchronized","shared","counter","(","initialized","to","zero",")","and","increasing","\/","decreasing","its","value","every","time","the","put","(",")","and","get","(",")","methods","are","called",",","respectively",".","This","not","only","prevents","NotImplementedError","from","being","raised",",","but","also","allows","us","to","implement","a","reliable","version","of","both","qsize","(",")","and","empty","(",")","."]
code: def put(self, *args, **kwargs) -> None:
      self.size.increment(1)
      super().put(*args, **kwargs)
  
file_path: tensortrade/tensortrade/agents/parallel/parallel_queue.py
imports: from deprecated import deprecated
  import multiprocessing
  from multiprocessing.queues import Queue
label_desc: Use image node_id 2 for calling the ParallelQueue obj's underlying member method code with example usage: obj.put() without return types