-
-
Notifications
You must be signed in to change notification settings - Fork 343
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
Add ability to wait for POLLPRI #463
Conversation
This function is only available for epoll. It uses the EPOLLPRI mode to trigger on an "exceptional condition", whatever that is with respect to the given file descriptor. Among other uses, this flag can be used to wait for changes on GPIO inputs, or for mode changes of a PTY slave device (when used on the master).
That would give us false positives.
Codecov Report
@@ Coverage Diff @@
## master #463 +/- ##
=========================================
- Coverage 99.26% 98.97% -0.3%
=========================================
Files 89 89
Lines 10403 13474 +3071
Branches 718 1517 +799
=========================================
+ Hits 10327 13336 +3009
- Misses 58 110 +52
- Partials 18 28 +10
Continue to review full report at Codecov.
|
The issue for this is #61. Looking at the docs linked there, I see that the described gpio API is now considered obsolete and broken. Out of curiosity, does the new "character device API" also use POLLPRI? (I realize it will be a while before everyone has kernels with the new API, and that there are other possible use cases for this, but I find it never hurts to know more about how things are used :-).) A fun thing to deal with is that on Windows when a non-blocking connect fails, this is reported by marking the socket as "priority". Everyone else uses "readable" for this. Currently we hack around this the same way that some other libraries do, by making the windows I guess one option would be to remove the hack from the io layer, and instead have our Another Windows-related thing to consider is that if we switch to iocp-only (#52), then we won't have a way to wait for priority at all on that platform. Though fortunately we won't need to, either, since the iocp version of |
Github is telling me you just pushed some strange things here? |
Gaah. Sorry, I'll undo this nonsense. |
This is very stale, so going to close for now... feel free to re-open if you want to pick it up again. |
This extension is required for some interesting things. Personally I need it for accessing GPIO pins (specifically, epoll()ing for changing inputs).
I still have to figure out how to reliably test this, given that the TCP URGent flag is less than well supported these days, Travis is unlikely to run on a machine with two connected GPIO pins, and I haven't done anything with PTYs in a decade.