-
Notifications
You must be signed in to change notification settings - Fork 739
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
Support for using poll as a backend #1604
Comments
I found something which probably needs change in the documentation in order for this to land, see here: Lines 89 to 96 in 3340f6d
In my PR I commented that this might be a breaking change, but reading this it may actually not be one. With the
|
As I said before I support this, since it would go a long way to making |
We haven't defined our policy properly yet (that's #853), but I would like to know at least the following before we can even start with the code.
|
1. Which platforms are going to use this?Any Unix (POSIX?) like platform with Systems that are so far known:
I assume those to actually be mostly embedded platforms. 2. Who is going to maintain it?Again a bit tricky to answer - while I expect this to not require too many changes (famous last words) I agree that someone needs to maintain it going forward. The positive side is that this can be tested on any Unix platform, so everyone who is using Linux can test and develop this selector. I also expect the esp-rs community to pick this up once it gets merged, which would mean people start using it more frequently. Maybe it can be marked as an experimental backend for now (requires coordination with tokio) as to warn people. Overall, I am willing to maintain this implementation - I am already using it in my personal as well as work projects. 3. CITesting the implementation is not too hard provided you do that on a Linux system. The CI step would be a build with the Testing it on the embedded systems is not really possible, however, these usually commit to a POSIX compatible API when providing |
ESP-IDF and Fuchisia are the two big-ticket platforms that would take advantage of this, although any Unix-like systems without a scalable polling system, like Haiku or Horizon, would also use this.
I could help maintain this.
You could force the old poll syscall on Linux. You could also use |
This is a little bit vague, but we can start with Haiku and expand from their.
I highly doubt this, that's what it always looks the first time ;)
I don't want to support
I'm afraid I need more concrete commitment than this.
This is good start.
I don't want any features for this, just support for OSs that don't support
Concrete implementations often have bugs and/or differences between the implementation and the spec, but we can put embedded (none-Linux) systems in an experiment tier.
Fuchsia is working on or has Linux capability and should work with
👍
See above, but testing this on OSs that have a different poll implementation isn't going to work. |
I'm not entirely sure where to start with CI, I couldn't find a CI solution which would allow to test on Haiku. (The only OS that I were able to test this on are Linux and the espidf) |
Alright, I think its time for some progress updates: The somewhat bad news is: I now need to also port |
Would qemu have lower overhead? We don't want to slow down the CI too much. |
Vagrant will be using Virtual Box on MacOS - I think this is the fastest solution, since it is the only one actually having nested virtualization on Github runners. |
I'm also running into a few tests which are now failing because they rely on file descriptors being removed automatically when they are closed. With poll this is not the case, you may receive events after closing a file descriptor if you don't properly deregister it. I've stated that already in the PR description, but I have the very strong feeling that this will qualify as a breaking change. EDIT: I think I have found a solution for this issue, very similar to what the windows implementation does already. It will take some time to implement it, but basically it saves the current registry in the IoSourceState. This should also allow proper edge based polling emulation. |
Tracking issue for #1602
See PR for a full technical description.
This is tracking the integration of a
mio
backend using the poll(2) syscall for Unix like OS that don't supportepoll
orkqueue
.Technically this can target every OS which supports the
poll
(or evenselect
syscall).The text was updated successfully, but these errors were encountered: