Open wang2357 opened 1 month ago
It is probably reasonable to have a polling approach for macos since it can't use Linux inotify if there is no better alternative, but you shouldn't remove the linux inotify code, it is much better as you noted in another thread..
The watchdog package is event driven on MacOS and uses inotify on Linux. So it has excellent performance on both platform. The earlier comment I made on watchdog was due to incorrect asyncio calls (basically the watchdog callback needs to be run in the same event loop as the main thread - otherwise the synchronization using needs_update signal is messed up). I have since removed this bug, and the extra delay on Mac due to this bug has been removed. I do not notice any performance degradation with the new code. So please look at the code again to see if it is acceptable.
There is a new issue, where the Push notification is no longer working, due to Microsoft removing legacy API. However, that is a totally separate issue. The changes from local to remote due to file changes are detected immediately and updated to cloud immediately.
Ok, I will try to test it
Use
watchdog
instead ofpyinotify
for maildir changes monitoring. The benefit is that the program can be used in other platforms.