| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks for the review @vstinner. I addressed your comments. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Thanks for the updates!
Sorry, something went wrong.
|
Whops! I fixed the remaining bare assert statements. |
Sorry, something went wrong.
|
@gpshead: Do you want to double check the change? |
Sorry, something went wrong.
|
In the hope of adding BSD / macOS support for asyncio in the future, I have opened #144211. |
Sorry, something went wrong.
|
Merged, thank you for this nice optimization! |
Sorry, something went wrong.
…on Linux / macOS / BSD (python#144047)
| Back | FazBrowse Home | New Git URL |
This patch replaces the busy-loop mechanism used by subprocess.Popen.wait() on Linux, BSD, and macOS when a timeout is specified:
The kernel wakes us up exactly when the PID terminates or the timeout expires. If the fast-wait mechanisms is not available or fails (e.g. "too many open files"), the function falls back to the traditional busy loop. A similar approach was recently implemented in psutil (see giampaolo/psutil#2706). While working on that change, I noticed that the subprocess module used essentially the same busy-loop strategy, which motivated this proposal.
EDIT: I wrote a blog post about this: https://gmpy.dev/blog/2026/event-driven-process-waiting