Skip to content

Add explicit non-blocking reads for BufferedReader - #2144

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

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).

@zariiii9003

Copy link
Copy Markdown
Collaborator

I just merged #2138 so this seems obsolete? Feel free to reopen if you disagree.

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.

2 participants