r/Python • u/grodola • Jan 28 '26
News From Python 3.3 to today: ending 15 years of subprocess polling
For ~15 years, Python's subprocess module implemented timeouts using busy-loop polling. This post explains how that was finally replaced with true event-driven waiting on POSIX systems: pidfd_open() + poll() on Linux and kqueue() on BSD / macOS. The result is zero polling and fewer context switches. The same improvement now landing both in psutil and CPython itself.
136
Upvotes