Commit graph

13 commits

Author SHA1 Message Date
Antonio Scandurra
1517ccf80b Always flush historical events in fsevent tests 2021-05-19 16:03:30 +02:00
Antonio Scandurra
1cf5413173 Increase timeout to 2s for fsevents tests 2021-05-19 15:01:11 +02:00
Max Brunsfeld
c867cfa917 Tweak durations in fsevent unit test to reduce odds of timeout 2021-04-29 12:52:28 -07:00
Max Brunsfeld
21cfb75a73 Flush redundant fs events in worktree test
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2021-04-28 12:42:39 -07:00
Max Brunsfeld
1eba61c08d Flush the fs event stream on construction 2021-04-27 21:43:41 -07:00
Max Brunsfeld
c1d35b099b Ignore 'historical' events from fs event stream
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-27 16:50:05 -07:00
Max Brunsfeld
907b537a0b Fix race when fs events occur right after constructing worktree
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-27 16:38:47 -07:00
Max Brunsfeld
b20f5e9139 Fully halt background scanner threads when dropping Worktree
* Rework fsevent API to expose a handle for halting the event stream

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-20 15:55:29 -07:00
Max Brunsfeld
47f0b94d0c Add an example executable for fsevents 2021-04-19 13:05:34 -07:00
Antonio Scandurra
e19a56c366 WIP 2021-04-16 19:54:46 +02:00
Max Brunsfeld
4878bf82ff Make EventStream interface more flexible
Take a callback instead of an mpsc Sender. The
run method blocks and invokes the callback for
each batch of events. The caller controls the
threading. The callback can return false to terminate
the event stream.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-15 17:38:52 -07:00
Max Brunsfeld
6d3dc85dad Tweak fsevent flags
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-15 16:46:34 -07:00
Max Brunsfeld
fbaab121f6 Add fsevent crate to workspace
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2021-04-15 16:29:55 -07:00