Skip to content

Document when an IPC read means end-of-stream - #130

Merged
kasperisager merged 1 commit into
mainfrom
ipc-eof-bindings
Sep 18, 2026
Merged

kasperisager merged 1 commit into
mainfrom
ipc-eof-bindings

Conversation

@bavulapati

Copy link
Copy Markdown
Contributor

The synchronous reads distinguish "nothing ready yet" from end-of-stream by returning nil/null versus empty, but said so nowhere, so a caller reading the headers had no way to tell the two apart.

Docs only, no behaviour change.

Worth noting for #83, whose third bullet asks for the opposite: it reads a zero-length result as a bug and wants nil instead. That would make end-of-stream indistinguishable from a would-block on the synchronous reads, since nil already means "nothing ready yet". The symptom #83 actually describes - bare-kit-swift's IPC: AsyncSequence never terminating - comes from the callback variants, and those were fixed in #86 and #89; they deliver nil/null at EOF and this documents that too. So I do not think there is anything left to implement there, only to document, but that bullet should be re-read rather than closed on my say-so.

The synchronous reads distinguish "nothing ready yet" from end-of-stream by
returning nil versus empty, but said so nowhere, so a caller had no way to
tell the two apart. The callback variants already deliver nil at EOF.
@bavulapati
bavulapati requested a review from a team September 18, 2026 05:46
@kasperisager
kasperisager merged commit 2b93ba4 into main Sep 18, 2026
23 of 24 checks passed
@kasperisager
kasperisager deleted the ipc-eof-bindings branch September 18, 2026 07:04
@bavulapati bavulapati mentioned this pull request Sep 18, 2026
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