Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
From Python 3.3 to today: ending 15 years of subprocess polling (gmpy.dev)
8 points by grodola 27 days ago | hide | past | favorite | 1 comment


For ~15 years, Python's subprocess.Popen.wait() 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: