Releases
v1.1.0
Compare
Sorry, something went wrong.
No results found
Changes
Breaking Changes
BREAKING: read_last() return signature changed from Optional[bytes] to Tuple[Optional[bytes], int]
Now returns (data, size) tuple where size indicates the number of slots the item occupies
Migration: Change data = q.read_last() to data, size = q.read_last()
Provides actual slot size information instead of always returning full element_size
Added
Modern format support with efficient last_published_ atomic tracking
New last_published_ atomic field at offset 16 for O(1) read_last() performance
Header magic number 0x534C5131 ('SLQ1') at offset 24 for format detection
Init state atomic at offset 48 for CAS-based ownership detection
Automatic format detection distinguishes modern vs legacy queues
CAS-based queue ownership detection matching C++ implementation (queue.h:618-648)
Helper methods _wait_for_shared_memory_ready() and _detect_format_version()
Comprehensive test suites:
test_read_last.py: 10 tests covering empty queue, single/multiple items, multi-slot publishes, concurrent publishes, reset, shared memory, wraparound, variable sizes
test_read_last_interop.py: 5 tests for Python ↔ C++ interoperability
test_modern_format.py: 6 tests for format compatibility and memory layout verification
C++ test program cpp_read_last_tester.cpp for read_last() interoperability testing
New constants: SIZE_OFFSET, ELEMENT_SIZE_OFFSET, LAST_PUBLISHED_OFFSET, HEADER_MAGIC_OFFSET, HEADER_MAGIC, INIT_STATE_OFFSET, INIT_STATE_*, K_INVALID_INDEX
Documentation: READ_LAST_INTEROP.md comprehensive interoperability guide
Changed
Updated shared memory header layout to match C++ slick-queue v1.x:
Reserved info: 8 bytes at offset 0-7 (compact from previous 32-byte padded format)
Size: 4 bytes at offset 8-11 (moved from offset 32)
Element size: 4 bytes at offset 12-15 (moved from offset 36)
Last published: 8 bytes at offset 16-23 (NEW)
Header magic: 4 bytes at offset 24-27 (NEW)
Init state: 4 bytes at offset 48-51 (NEW)
publish() now updates last_published_ atomic using CAS loop in modern format (queue.h:331-337)
reset() now resets last_published_ to K_INVALID_INDEX when in modern format
close() properly releases _atomic_last_published wrapper
AtomicReservedInfo.RESERVED_INFO_FMT simplified from 32-byte to 8-byte format
Repository name changed from slick_queue_py to slick-queue-py
Updated README.md with new read_last() API documentation
Enhanced CMakeLists.txt with new test targets
Fixed
read_last() now returns actual slot size instead of always returning full element_size
Test queue names shortened to comply with macOS 31-character shared memory name limit
Performance
O(1) read_last() via direct atomic load (improved from reserved_info calculation)
Reduced header size: 8-byte reserved_info vs 32-byte padded (24 bytes saved)
Lock-free last_published_ tracking enables efficient concurrent access
Compatibility
Backward Compatible: Automatically detects and supports legacy queue format
C++ Interop: Full compatibility with C++ slick-queue modern format
Python and C++ can share queues created by either language
All existing tests continue to pass (atomic ops, cursors, local mode, multi-producer, interop)
You can’t perform that action at this time.