3 ms·
Breaks cross-platform, specifically Macs swallow silently. stat just works
by russellthehippo 6mo ago
Breaks cross-platform, specifically Macs swallow silently. stat just works
- Retr0id 6mo agoI don't believe this to be true.
- russellthehippo 6mo agoSee comment below - Darwin silently drops same-process notifs. I could change the behavior depending on same vs cross process and platform but I wanted to”just one thing to worry about”. Potentially a good optimization later. Would help reduce syscalls.
- Retr0id 6mo agoI believe you are mistaken. If you are referring to the comment from ArielTM, that's an LLM bot regurgitating your readme.
- russellthehippo 6mo agoApologies for not being specific. The specific thing I'm talking about is this: write events don't fire until the file handle is closed. [1] I didn't validate this myself btw, but my original design was certainly trying to use notify events rather than stat polling. My research (heavily AI assisted of course) led me away from that path as platforms differ in behavior and I wanted to avoid that. [1] https://github.com/notify-rs/notify/issues/240 https://github.com/notify-rs/notify/issues/240
- russellthehippo 6mo agoIf this has been fixed somewhere or there is a better alternative I'd love to use that over polling. Current plan is to move to polling data version for speed + occasional stat for safety. Getting rid of polling was my original goal but i compromised with syscalls.
- xenadu02 6mo agoI have no idea why they aren't using kqueue but that works on macOS and FreeBSD. It has for years. You want EVFILT_VNODE with NOTE_WRITE. That's hooked up to VNOP_WRITE in the kernel, the call made to the relevant filesystem to actually perform the write.