class_docstr: Wrapper around the queue that enables writing to the queue in a separate thread, just in
  case a writing process would have to wait too long for a lock on the queue when multiple
  readers pop the items one by one.
class_docstr_tok: ["Wrapper","around","the","queue","that","enables","writing","to","the","queue","in","a","separate","thread",",","just","in","case","a","writing","process","would","have","to","wait","too","long","for","a","lock","on","the","queue","when","multiple","readers","pop","the","items","one","by","one","."]
code: def extend(self, msgs):
      with self.pending_cv:
          self.pending.extend(msgs)
          self.pending_cv.notify()
  
imports: from typing import List, Optional
  import os
  import threading
  from nvidia.dali._multiproc import shared_mem
  from nvidia.dali._multiproc.messages import Structure, ShmMessageDesc
  from nvidia.dali._multiproc.shared_batch import _align_up
label_desc: Use image node_id 5 for calling the Dispatcher obj's underlying member method code with example usage: obj.extend(msgs) without return types