Skip to content

Stop the fswatch reader after EOF#14675

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-vyzunxxxwqtx
May 23, 2026
Merged

Stop the fswatch reader after EOF#14675
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-vyzunxxxwqtx

Conversation

@rgrinberg
Copy link
Copy Markdown
Member

When the external fswatch process closed stdout, the reader loop enqueued Watcher_terminated and then immediately tried to read again. Since the channel stayed at EOF, it could spin and keep filling the scheduler queue.

Enqueue the termination event once and let the reader thread exit.

When the external fswatch process closed stdout, the reader loop enqueued Watcher_terminated and then immediately tried to read again. Since the channel stayed at EOF, it could spin and keep filling the scheduler queue.

Enqueue the termination event once and let the reader thread exit.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg rgrinberg merged commit f31b439 into ocaml:main May 23, 2026
22 of 23 checks 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