-
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
A way to add EPOLLPRI event type to the epoll selector #1645
Comments
|
Really? I don't see this backed by the code and I do not get any mio/src/sys/unix/selector/epoll.rs Lines 170 to 182 in 1f8cd97
This sets the event type flags up for the syscall. And it does not set EPOLLPRI .
I made a "horrible hack" here: poeschel@538970c |
|
Hello, I am working with @poeschel on this problem. We have created a small test project which can be found here: https://github.com/poeschel/mio-pollpri-test The program sends messages over a TCP socket and checks the received events. We also send a
With the "horrible hack" posted above, the output changes to:
You can see that the flags contains As mentioned above, we work with |
This program is incorrect. You should get only a single event for the send on line 20. You should drain the readiness, see https://docs.rs/mio/latest/mio/struct.Poll.html#readiness-operations, to get another event. |
I created pull-request #1646 that demonstrates the issue a bit better. |
... and I would suggest something like this as a possible solution: poeschel@282edd3 |
While working with Video4Linux2 I am searching for a way to (a)wait
POLLPRI
events coming from the kernel.I do see, that an
Event
can be checked if itis_prioprity
:mio/src/sys/unix/selector/epoll.rs
Lines 227 to 229 in fa4e4b3
But I wonder how to register at the
Selector
in a way that it receives this type of events?Looking at
mio/src/sys/unix/selector/epoll.rs
Lines 114 to 123 in fa4e4b3
Interest
would be needed, but it is not there:mio/src/interest.rs
Lines 19 to 34 in fa4e4b3
I searched a bit through the history and found something similar was already there:
mio/src/event_imp.rs
Lines 613 to 622 in 434405a
But it is gone and I don't know why.
So my questions:
is_priority
function there? It is of no use at the moment, right?Ready:PRIORITY
? Is there some reason why this got removed or was it a mistake?POLLPRI
type events?The text was updated successfully, but these errors were encountered: