Skip to content

Add explicit non-blocking reads for BufferedReader - #2144

Open
zhaojiale2021 wants to merge 1 commit into
hardbyte:mainfrom
zhaojiale2021:copilot-doc-check
Open

zhaojiale2021 wants to merge 1 commit into
hardbyte:mainfrom
zhaojiale2021:copilot-doc-check

Conversation

@zhaojiale2021

Copy link
Copy Markdown

Fixes the ambiguity around timeout=0 by providing BufferedReader.get_message_nowait(), backed by SimpleQueue.get(block=False).

The new method returns the oldest queued message or None without waiting, and remains compatible with the existing FIFO behavior. The docstring now points timeout-based callers to the explicit non-blocking API.

Validation: test/listener_test.py (11 tests passed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant