2 ms·
I'm not seeing python creating a self-pipe for `loop.add_signal_handler`. edit: Oh, it uses `signal.set_wakeup_fd`, interesting. https://docs.python.org/3/lib
by badmintonbaseba 2y ago
I'm not seeing python creating a self-pipe for `loop.add_signal_handler`.
edit: Oh, it uses `signal.set_wakeup_fd`, interesting.
https://docs.python.org/3/library/signal.html#signal.set_wakeup_fd https://docs.python.org/3/library/signal.html#signal.set_wak...
edit2: it looks like the fd comes from a self-socket, but yeah, it's the same approach. The function is even called `_make_self_pipe`.
https://github.com/python/cpython/blob/bf21e2160d1dc6869fb230b90a23ab030835395b/Lib/asyncio/selector_events.py#L118-L124 https://github.com/python/cpython/blob/bf21e2160d1dc6869fb23...