🔹 What's New?
- Added
peek(n: int = 0, sep: str = ",") -> bytes
- Retrieves messages from the queue without removing them.
- Supports fetching multiple messages:
n=0
retrieves all available messages.
n>0
retrieves up to n
messages, separated by sep
.
- Returns an empty byte string (
b""
) if the queue is empty.
🛠️ Bug Fixes & Improvements
- Improved documentation and updated README for better clarity.
- Enhanced unit tests to cover
peek
behavior.
- Optimized thread safety by refining the locking mechanism.
🚀 How to Upgrade?
pip install --upgrade stiqueue