classification
Title: multiprocess.Process join method - timeout indistinguishable from success
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Brian.Cain, asksol, berker.peksag, davin, docs@python, jnoller, python-dev, r.david.murray, tclark
Priority: normal Keywords: easy, patch

Created on 2010-12-10 14:36 by Brian.Cain, last changed 2016-09-26 20:21 by berker.peksag. This issue is now closed.

Files
File name Uploaded Description Edit
Process_join.patch Brian.Cain, 2010-12-10 14:36 patch to add the join result as return value
multiprocessing.patch tclark, 2016-09-12 04:33 review
Messages (9)
msg123733 - (view) Author: Brian Cain (Brian.Cain) * Date: 2010-12-10 14:36
When calling Process' join([timeout]) method, the timeout expiration case is indistinguishable from the successful join.  I suppose the 'exitcode' attribute can deliver the necessary information, but perhaps join could stand on its own.

If join() shouldn't be changed, could we make explicit reference to the exitcode attribute in the documentation?
msg123735 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-12-10 15:26
My guess is "it shouldn't", and "yes", but I've added the multiprocessing maintainers as nosy and they can answer definitively.
msg123736 - (view) Author: Ask Solem (asksol) (Python committer) Date: 2010-12-10 15:36
While it makes sense for `join` to raise an error on timeout, that could possibly break existing code, so I don't think that is an option.  Adding a note in the documentation would be great.
msg271724 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-07-31 06:32
Thread.join() also returns None in all cases so +1 for documenting the current behavior.
msg275944 - (view) Author: Tom Clark (tclark) * Date: 2016-09-12 04:14
I've submitted a documentation patch with #28094.
msg275954 - (view) Author: Tom Clark (tclark) * Date: 2016-09-12 04:33
This patch is intended to document the behaviour of join(). (Originally submitted to #28094)
msg275955 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-12 04:37
Tom's patch looks good to me. Davin, can you have a look at it?
msg277461 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-26 20:21
New changeset 112060f8abe8 by Berker Peksag in branch '3.5':
Issue #10673: Document that Process.exitcode can be used to determine timeout
https://hg.python.org/cpython/rev/112060f8abe8

New changeset 0414ce8a3b5c by Berker Peksag in branch '3.6':
Issue #10673: Merge from 3.5
https://hg.python.org/cpython/rev/0414ce8a3b5c

New changeset f91650739061 by Berker Peksag in branch 'default':
Issue #10673: Merge from 3.6
https://hg.python.org/cpython/rev/f91650739061
msg277462 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2016-09-26 20:21
Thanks, Tom.
History
Date User Action Args
2016-09-26 20:21:45berker.peksagsetstatus: open -> closed
versions: + Python 3.7
messages: + msg277462

components: - Library (Lib)
resolution: fixed
stage: patch review -> resolved
2016-09-26 20:21:16python-devsetnosy: + python-dev
messages: + msg277461
2016-09-13 20:35:23ppperrysetassignee: docs@python

components: + Documentation
nosy: + docs@python
2016-09-12 04:37:32berker.peksagsetmessages: + msg275955
stage: needs patch -> patch review
2016-09-12 04:34:00tclarksetfiles: + multiprocessing.patch

messages: + msg275954
2016-09-12 04:29:56berker.peksaglinkissue28094 superseder
2016-09-12 04:14:07tclarksetnosy: + tclark
messages: + msg275944
2016-08-01 02:23:09ned.deilysetnosy: + davin
2016-07-31 06:32:37berker.peksagsetversions: + Python 3.5, Python 3.6, - Python 3.3
nosy: + berker.peksag

messages: + msg271724

keywords: + easy
stage: needs patch
2011-01-03 19:57:11pitrousetnosy: jnoller, r.david.murray, asksol, Brian.Cain
versions: + Python 3.3, - Python 3.1, Python 2.7
2010-12-10 15:36:31asksolsetmessages: + msg123736
2010-12-10 15:26:18r.david.murraysetnosy: + asksol, r.david.murray, jnoller
messages: + msg123735
2010-12-10 14:36:02Brian.Caincreate