Start the writer
In the first terminal:ZINC, and sends a notification. It prints ready and waits for a line on standard input. Leave it running while you start the reader.
Read from Python
In a second terminal, from the repository root:ZINC. It consumes the notification before reading, even though the writer sent it before the reader opened the region.
Press Enter in the writer’s terminal to close the creator and unlink the name. Existing mappings remain valid until their handles and retained views close.
What happened
The creator usedshm_open, ftruncate, and mmap to create a shared mapping. Python opened the same backing pages through the C ABI. Its buffer view accesses those bytes without a transfer through a socket or a serialization step.
Data starts after the first header page. The writer uses the system page size, so this example works with both 4096-byte and 16384-byte pages.
For repeated updates, add an acknowledgement before the writer overwrites data that a reader may still be using. See notify and wait, data access, and the adapter references.