parameters: (self, maxsize: int = 0)
docstring: r"""Use pyarrow in-memory plasma store to implement shared memory queue.
          Compared to native `multiprocess.Queue`, `PlasmaShmQueue` avoid pickle/unpickle
          and communication overhead, leading to better performance in multi-process
          application.
  
          Args:
              maxsize: maximum size of the queue, `None` means no limit. (default: ``None``)
docstring_summary: r"""Use pyarrow in-memory plasma store to implement shared memory queue.
          Compared to native `multiprocess.Queue`, `PlasmaShmQueue` avoid pickle/unpickle
          and communication overhead, leading to better performance in multi-process
          application.
docstring_tokens: r Use pyarrow in - memory plasma store to implement shared memory queue . Compared to native multiprocess . Queue PlasmaShmQueue avoid pickle / unpickle and communication overhead leading to better performance in multi - process application .
function: def __init__(self, maxsize: int = 0):
          r"""Use pyarrow in-memory plasma store to implement shared memory queue.
          Compared to native `multiprocess.Queue`, `PlasmaShmQueue` avoid pickle/unpickle
          and communication overhead, leading to better performance in multi-process
          application.
  
          Args:
              maxsize: maximum size of the queue, `None` means no limit. (default: ``None``)
          """
  
          # Lazy start the plasma store manager
          global MGE_PLASMA_STORE_MANAGER
          if MGE_PLASMA_STORE_MANAGER is None:
              try:
                  MGE_PLASMA_STORE_MANAGER = _PlasmaStoreManager()
              except Exception as e:
                  err_info = (
                      "Please make sure pyarrow installed correctly!\n"
                      "You can try reinstall pyarrow and see if you can run "
                      "`plasma_store -s /tmp/mge_plasma_xxx -m 1000` normally."
                  )
                  raise RuntimeError(
                      "Exception happened in starting plasma_store: {}\n"
                      "Tips: {}".format(str(e), err_info)
                  )
          else:
              MGE_PLASMA_STORE_MANAGER.refcount += 1
  
          self.socket_name = MGE_PLASMA_STORE_MANAGER.socket_name
  
          # TODO: how to catch the exception happened in `plasma.connect`?
          self.client = None
  
          # Used to store the header for the data.(ObjectIDs)
          self.queue = Queue(maxsize)
function_tokens: def __init__ ( self , maxsize : int = 0 ) : # Lazy start the plasma store manager global MGE_PLASMA_STORE_MANAGER if MGE_PLASMA_STORE_MANAGER is None : try : MGE_PLASMA_STORE_MANAGER = _PlasmaStoreManager ( ) except Exception as e : err_info = ( "Please make sure pyarrow installed correctly!\n" "You can try reinstall pyarrow and see if you can run " "`plasma_store -s /tmp/mge_plasma_xxx -m 1000` normally." ) raise RuntimeError ( "Exception happened in starting plasma_store: {}\n" "Tips: {}" . format ( str ( e ) , err_info ) ) else : MGE_PLASMA_STORE_MANAGER . refcount += 1 self . socket_name = MGE_PLASMA_STORE_MANAGER . socket_name # TODO: how to catch the exception happened in `plasma.connect`? self . client = None # Used to store the header for the data.(ObjectIDs) self . queue = Queue ( maxsize )