[New-bugs-announce] [issue12040] Expose a Process.sentinel property (and fix polling loop in Process.join())

Antoine Pitrou report at bugs.python.org
Mon May 9 20:39:23 CEST 2011


New submission from Antoine Pitrou <pitrou at free.fr>:

This patch exposes a new read-only property of multiprocessing.Process objects, named "sentinel".
As the doc indicates, this is a file descriptor undex Unix, and a handle under Windows. Both are suitable for flexible polling/waiting with the appropriate OS primitives. They become ready when the process has ended.
Under Unix, this also replaces the repeated polling in _Popen.wait() (called from Process.join()) with a regular select() call, making it friendlier with CPU low-power states.

This is necessary for issue9205.

----------
components: Library (Lib)
files: process_sentinel.patch
keywords: patch
messages: 135623
nosy: asksol, brian.curtin, gregory.p.smith, jnoller, neologix, pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Expose a Process.sentinel property (and fix polling loop in Process.join())
type: feature request
versions: Python 3.3
Added file: http://bugs.python.org/file21945/process_sentinel.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12040>
_______________________________________


More information about the New-bugs-announce mailing list