-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replaced hand-rolled with mio-based event loop. #40
Conversation
@@ -40,6 +40,11 @@ walker = "^1.0.0" | |||
[target.x86_64-unknown-linux-gnu.dependencies.inotify] | |||
version = "^0.1" | |||
|
|||
[target.x86_64-unknown-linux-gnu.dependencies.mio] | |||
git = "https://github.com/carllerche/mio.git" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is my understanding that libraries which depend on libraries not in Crates.io cannot be published to Crates.io. Has this changed? If not, I cannot accept this PR until it points to a Crates.io-released version of mio
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never published a crate, but that makes a lot of sense. Do you mind if I keep this PR open in the meantime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. If there's an issue tracking this mio
feature, could you link it here so we can keep track of when it makes it in a release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The next mio
milestone has a ETA for 3rd December, but I don't know whether EventedFd
will be in there. I've asked on IRC for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking that up/inquiring on IRC. Presumably 0.5.x will be branched off from master, so EventedFd
should be included. I'll keep an eye on it either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IRC confirmed it :)
c4d3171
to
5fc79a2
Compare
I've switched mio to version The windows builds are failing ("Could not compile |
I'll fix windows |
@@ -43,6 +43,9 @@ version = "^0.1" | |||
[target.x86_64-unknown-linux-musl.dependencies.inotify] | |||
version = "^0.1" | |||
|
|||
[target.x86_64-unknown-linux-gnu.dependencies.mio] | |||
version = "^0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also do this for target.x86_64-unknown-linux-musl
You might have to rebase this. |
5fc79a2
to
f5d2ec2
Compare
Added mio for linux-musl, squashed and rebased. |
version = "^0.5" | ||
|
||
[target.x86_64-unknown-linux-musl.dependencies.mio] | ||
version = "^0.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use the style as shown by other stanzas? Add mio = "^0.5"
to the relevant stanzas.
f5d2ec2
to
af8e181
Compare
Done. |
Woohoo! Let's do this. |
Replaced hand-rolled with mio-based event loop.
Shipped in v2.5.2. |
Cool, thanks. ;) |
This is a follow-up to #37 and hannobraun/inotify-rs#28. Currently the inotify file descriptor is closed on the thread which drops the
Watcher
, for which the behavior is undefined. With these changes, a message is dispatched to the event loop, causing it to shut itself down.