This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: multiprocessing.Process.join does not block if timeout is lower than 1
Type: behavior Stage: resolved
Components: Library (Lib) Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Multiprocessing queue get method does not block for short timeouts
View: 17707
Assigned To: Nosy List: Valentin.Lorentz, neologix
Priority: normal Keywords:

Created on 2013-04-27 16:56 by Valentin.Lorentz, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg187916 - (view) Author: ProgVal (Valentin.Lorentz) Date: 2013-04-27 16:56
In Python 3.3, multiprocessing.Process.join() is not blocking with floats lower than 1.0 (not included). It works as expected (ie. blocking for the specified timeout) in Python 2.6->3.2

As you can see in this example, calling join() with 0.99 returns immediately.

$ python3.3
Python 3.3.1 (default, Apr  6 2013, 13:58:40) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import multiprocessing
>>> def foo():
...  time.sleep(1000)
... 
>>> p = multiprocessing.Process(target=foo)
>>> p.start()
>>> bar = time.time(); p.join(0.99); print(time.time()-bar)
0.015963315963745117
>>> p.is_alive()
True
>>> bar = time.time(); p.join(1.0); print(time.time()-bar)
1.0011239051818848
>>> p.is_alive()
True
msg187917 - (view) Author: Charles-François Natali (neologix) * (Python committer) Date: 2013-04-27 17:18
Thanks for the report, but it's a duplicate of #17707 (recently fixed).
History
Date User Action Args
2022-04-11 14:57:45adminsetgithub: 62056
2013-04-27 17:18:13neologixsetstatus: open -> closed

superseder: Multiprocessing queue get method does not block for short timeouts
versions: - Python 3.3
nosy: + neologix

messages: + msg187917
resolution: duplicate
stage: resolved
2013-04-27 16:56:50Valentin.Lorentzcreate