python / cpython

The Python programming language
https://www.python.org
Other
63.86k stars 30.57k forks source link

Add `EPOLLWAKEUP` to the select module #127481

Open rruuaanng opened 2 days ago

rruuaanng commented 2 days ago

Feature or enhancement

Proposal:

This issue suggests adding new select constants.

for example

fd = /* a socket object */
p = /* a epoll object */
/* It will prevent the system from hanging (e.g. low-power or standby) */
p.register(fd, EPOLLWAKEUP)

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Linked PRs

encukou commented 23 hours ago

Since EPOLL_URING_WAKE is meant to only be used by uring, I would not add it. It'll be a while until you can write internal kernel internals in Python.

As for EPOLLWAKEUP, yes, it seems useful to expose that.

rruuaanng commented 12 hours ago

Since EPOLL_URING_WAKE is meant to only be used by uring, I would not add it. It'll be a while until you can write internal kernel internals in Python.

As for EPOLLWAKEUP, yes, it seems useful to expose that.

I've remove it, and change the title.