aistore.sdk.obj.content_iterator.buffer
aistore.sdk.obj.content_iterator.buffer
Module Contents
Classes
API
Result of a parallel object download, backed by shared memory.
Parallel download splits a single object into byte ranges and fetches
them concurrently using multiple workers. Workers write directly into a
SharedMemory segment; the caller receives a memoryview with no copy.
The caller must call close() (or use as a context manager) when
done.
Memoryview of the downloaded content (no extra copy on return).
Name of the underlying shared memory segment.
Release and unlink the underlying shared memory segment.
Safe to call multiple times; the second call is a no-op.
Copy content into a new bytes object (extra copy).
Bases: ParallelBuffer
Shared-memory ring buffer with per-slot ready Events.
Extends ParallelBuffer: inherits shm allocation, buf, name, and close().
Adds slot indexing and Event-based synchronization for the streaming
(create_iter) path.
Allocates num_slots x slot_size bytes in /dev/shm. Each slot has
a dedicated mp.Event that a worker sets when its data is ready.
Copy data_len bytes out of the slot into a new bytes object.
Block until the slot is ready, then reset it for reuse.