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
Contributor

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.

@zhaojiale2021

Copy link
Copy Markdown
Contributor Author

Thanks for checking. I verified PR #2138 documents timeout=0 as immediate queue polling and already closes this issue; this separate patch is therefore obsolete.

@zhaojiale2021
zhaojiale2021 deleted the copilot-doc-check branch November 22, 2026 15:36
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