Skip to content

Conversation

@wosc
Copy link

@wosc wosc commented Jan 12, 2019

See issue #10 for more details. I've tested this under both Linux and macOS, and it worked fine for me.

Note that watchgod (isn't that name cute ;) does not use inotify/fsevents but file polling instead. I don't think the performance implications are terrible, but I admit it's not as pleasing to my nerd-sense of elegance.

My main reason for chosing it is that it offers an asyncio-compatible API, so it was really easy to integrate. Alternatives do exist, e.g. watchdog was mentioned in a previous issue comment, that uses inotify on Linux and FSEvents on macOS. However, its API is thread-based, and I have no idea how that could be integrated with asyncio, or whether that's even possible.

@jlebon
Copy link
Owner

jlebon commented Jan 14, 2019

Neat, thanks for this!

Alternatives do exist, e.g. watchdog was mentioned in a previous issue comment, that uses inotify on Linux and FSEvents on macOS. However, its API is thread-based, and I have no idea how that could be integrated with asyncio, or whether that's even possible.

Hmm, I haven't hacked on asyncio Python in a while, but I think we could get this to work. Will investigate.

phdru added a commit to phdru/textern that referenced this pull request Feb 24, 2024
`watchdog` is much more portable.

Fixes: jlebon#46.
phdru added a commit to phdru/textern that referenced this pull request Feb 24, 2024
`watchdog` is much more portable.

Fixes: jlebon#46.
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.

2 participants