guybedford opened issue #6740:
Feature
Change the adapter implementation to always ensure that
blocking_readreturning adonevalue oftruewill not callblocking_readagain requiring an unnecessary empty vec, as this function call is effectively redundant.Benefit
It removes redundancy in the read calls.
Implementation
Not sure, would be good to weigh up that it doesn't complicate the implementation.
Alternatives
It's fine to leave as-is for now, so this is certainly non-urgent, but it could also be nice to implement non-redundancy.
jameysharp commented on issue #6740:
This sounds like the kind of thing which either is surprisingly complicated or would be a nice candidate for the "good first issue" tag. I'd love it if somebody could take enough of a look to decide which of those it is, and if it's the latter, leave a few hints here in case somebody out there wants a project to work on.
sunfishcode commented on issue #6740:
I think the most straightforward way to do this would be to add a
at_endflag to theStreamsstruct, set it whenblocking_readindicates the end is reached, and check it before callingblocking_read. And clear it infd_seekat the same time it doesstream.input.set(None).
Last updated: Dec 13 2025 at 19:03 UTC