File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 736736
737737 (Contributed by Ron Frederick in :gh: `138252 `.)
738738
739+ subprocess
740+ ----------
741+
742+ * :meth: `subprocess.Popen.wait `: when ``timeout `` is not ``None ``, an efficient
743+ event-driven mechanism now waits for process termination, if available:
744+
745+ - Linux ≥5.3 uses :func: `os.pidfd_open ` + :func: `select.poll `
746+ - macOS and other BSD variants use :func: `select.kqueue ` + ``KQ_FILTER_PROC ``
747+ + ``KQ_NOTE_EXIT ``
748+ - Windows keep using ``WaitForSingleObject `` (unchanged)
749+
750+ If none of these mechanisms are available, the function falls back to the
751+ traditional busy loop (non-blocking call and short sleeps).
752+ (Contributed by Giampaolo Rodola in :gh: `83069 `).
739753
740754sys
741755---
You can’t perform that action at this time.
0 commit comments