diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-06-06 17:35:31 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-06-06 17:35:31 (GMT) |
commit | 176f07dadf80c27348486fdd8017fabbb30da842 (patch) | |
tree | d489214386a5a7d5efec5d157be5783554c6cec2 /Doc/library/multiprocessing.rst | |
parent | f068ab830448ea9f78ee0dfbb29c12211d1b6aee (diff) | |
download | cpython-176f07dadf80c27348486fdd8017fabbb30da842.zip cpython-176f07dadf80c27348486fdd8017fabbb30da842.tar.gz cpython-176f07dadf80c27348486fdd8017fabbb30da842.tar.bz2 |
Issue #12040: Expose a new attribute `sentinel` on instances of
:class:`multiprocessing.Process`. Also, fix Process.join() to not use
polling anymore, when given a timeout.
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r-- | Doc/library/multiprocessing.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst index e1f4382..0e220d6 100644 --- a/Doc/library/multiprocessing.rst +++ b/Doc/library/multiprocessing.rst @@ -411,6 +411,20 @@ The :mod:`multiprocessing` package mostly replicates the API of the See :ref:`multiprocessing-auth-keys`. + .. attribute:: sentinel + + A numeric handle of a system object which will become "ready" when + the process ends. + + On Windows, this is an OS handle usable with the ``WaitForSingleObject`` + and ``WaitForMultipleObjects`` family of API calls. On Unix, this is + a file descriptor usable with primitives from the :mod:`select` module. + + You can use this value if you want to wait on several events at once. + Otherwise calling :meth:`join()` is simpler. + + .. versionadded:: 3.3 + .. method:: terminate() Terminate the process. On Unix this is done using the ``SIGTERM`` signal; |