ezmsg.tools.shmem.shmem_mirror#
It is possible to move data from ezmsg to non-ezmsg processes using shared memory. This module contains the non-ezmsg half of that communication. The ezmsg half is found in .shmem. The same shmem_name must be passed to both the ShMemCircBuff and the EZShmMirror objects!
Classes
- class EZShmMirror(shmem_name=None)[source]#
Bases:
objectAn object that has a local (in-client-process) representation of the shared memory from another process’ .shmem.ShMemCircBuff Unit.
There are 2 pieces of shared memory: the metadata and the data buffer. The ezmsg node is responsible for creating both pieces. Here we only connect to them. We cannot know if the shared memory exists before we try to connect to it, so we must try the connection – sometimes repeatedly while handling connection errors.
- Parameters:
shmem_name (str | None)
- property meta: ShmemArrMeta | None#
- class EZShmMirror(shmem_name=None)[source]#
Bases:
objectAn object that has a local (in-client-process) representation of the shared memory from another process’ .shmem.ShMemCircBuff Unit.
There are 2 pieces of shared memory: the metadata and the data buffer. The ezmsg node is responsible for creating both pieces. Here we only connect to them. We cannot know if the shared memory exists before we try to connect to it, so we must try the connection – sometimes repeatedly while handling connection errors.
- Parameters:
shmem_name (str | None)
- property meta: ShmemArrMeta | None#