classification
Title: multiprocessing ThreadPool is untested
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: pitrou Nosy List: davin, jnoller, neologix, pitrou, python-dev, sbt, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016-03-09 20:37 by pitrou, last changed 2016-03-15 09:56 by pitrou. This issue is now closed.

Files
File name Uploaded Description Edit
test_threadpool.patch pitrou, 2016-03-09 20:37 review
test_threadpool2.patch pitrou, 2016-03-09 20:58 review
Messages (5)
msg261474 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2016-03-09 20:37
There is a mistake in _test_multiprocessing.py which means that ThreadPool is untested, the regular Pool is tested instead by the ThreadsMixin.  Patch attached.
msg261476 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2016-03-09 20:58
Turns out a couple of tests were calling multiprocessing.Pool directly, updating patch.
msg261484 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-03-10 06:13
LGTM.

Is it worth to change multiprocessing.Pool in _TestPoolWorkerErrors and _TestPoolWorkerLifetime? Currently they work only for processes, but may be they can be generalized.
msg261804 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2016-03-15 09:34
> Is it worth to change multiprocessing.Pool in _TestPoolWorkerErrors
> and _TestPoolWorkerLifetime? Currently they work only for processes,
> but may be they can be generalized.

Perhaps as another issue?  It may be more involved than this one.
msg261807 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-03-15 09:56
New changeset 4cabf12b7fc6 by Antoine Pitrou in branch '3.5':
Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested.
https://hg.python.org/cpython/rev/4cabf12b7fc6

New changeset 131f92510164 by Antoine Pitrou in branch 'default':
Issue #26523: The multiprocessing thread pool (multiprocessing.dummy.Pool) was untested.
https://hg.python.org/cpython/rev/131f92510164
History
Date User Action Args
2016-03-15 09:56:34pitrousetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2016-03-15 09:56:08python-devsetnosy: + python-dev
messages: + msg261807
2016-03-15 09:34:15pitrousetmessages: + msg261804
2016-03-14 08:47:02serhiy.storchakasetassignee: pitrou
stage: patch review -> commit review
2016-03-10 06:13:57serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg261484
2016-03-10 01:39:45ned.deilysetnosy: + davin
2016-03-09 20:58:29pitrousetfiles: + test_threadpool2.patch

messages: + msg261476
2016-03-09 20:37:10pitroucreate