fsevents: Keep a stream running across watch/unwatch rebuilds - #9
Merged
Conversation
…and `watch`/`unwatch`/`update_paths` rebuild it with stop-then-start. Between the stop and the start nothing is watching, so kernel events firing in that window are silently dropped for *every* watched path, not just the one being changed. Since the new stream is created with `kFSEventStreamEventIdSinceNow`, the gap is never replayed. Instead, start the replacement stream first and stop the old one only once the new one is running, so a stream is watching at every moment. If the new stream fails to start, keep the old one so the previous path set keeps delivering.
probably-neb
approved these changes
Jul 21, 2026
pull Bot
pushed a commit
to Jaleel-zhu/zed
that referenced
this pull request
Jul 21, 2026
See also zed-industries/notify#9 <img width="2088" height="266" alt="image" src="https://github.com/user-attachments/assets/f4bc0b5c-76a9-424a-9abc-abde6e56b9db" /> Release Notes: - N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes hanging tests in Zed:
