forked from pool/python
- multiprocessing: thread joining itself (bnc#747794)
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=132
This commit is contained in:
parent
1b714c33b3
commit
7c3370e837
36
python-2.7.3-multiprocessing-join.patch
Normal file
36
python-2.7.3-multiprocessing-join.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User Richard Oudkerk <shibturn@gmail.com>
|
||||||
|
# Date 1340030251 -3600
|
||||||
|
# Node ID 4c07b9c49b75a10874d98841bb2d826f118835a3
|
||||||
|
# Parent 8b38a81ba3bfa0535b3e7719c3b0e62343a56698
|
||||||
|
Issue #15101: Make pool finalizer avoid joining current thread
|
||||||
|
|
||||||
|
diff --git a/Lib/multiprocessing/pool.py b/Lib/multiprocessing/pool.py
|
||||||
|
--- a/Lib/multiprocessing/pool.py
|
||||||
|
+++ b/Lib/multiprocessing/pool.py
|
||||||
|
@@ -489,7 +489,8 @@ class Pool(object):
|
||||||
|
# We must wait for the worker handler to exit before terminating
|
||||||
|
# workers because we don't want workers to be restarted behind our back.
|
||||||
|
debug('joining worker handler')
|
||||||
|
- worker_handler.join()
|
||||||
|
+ if threading.current_thread() is not worker_handler:
|
||||||
|
+ worker_handler.join(1e100)
|
||||||
|
|
||||||
|
# Terminate workers which haven't already finished.
|
||||||
|
if pool and hasattr(pool[0], 'terminate'):
|
||||||
|
@@ -499,10 +500,12 @@ class Pool(object):
|
||||||
|
p.terminate()
|
||||||
|
|
||||||
|
debug('joining task handler')
|
||||||
|
- task_handler.join(1e100)
|
||||||
|
+ if threading.current_thread() is not task_handler:
|
||||||
|
+ task_handler.join(1e100)
|
||||||
|
|
||||||
|
debug('joining result handler')
|
||||||
|
- result_handler.join(1e100)
|
||||||
|
+ if threading.current_thread() is not result_handler:
|
||||||
|
+ result_handler.join(1e100)
|
||||||
|
|
||||||
|
if pool and hasattr(pool[0], 'terminate'):
|
||||||
|
debug('joining pool workers')
|
@ -1,6 +1,7 @@
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 6 19:01:46 UTC 2013 - jmatejek@suse.com
|
Fri Feb 8 14:49:45 UTC 2013 - jmatejek@suse.com
|
||||||
|
|
||||||
|
- multiprocessing: thread joining itself (bnc#747794)
|
||||||
- gettext: fix cases where no bundle is found (bnc#794139)
|
- gettext: fix cases where no bundle is found (bnc#794139)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
@ -52,6 +52,7 @@ Patch18: python-2.7.3-ssl_ca_path.patch
|
|||||||
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
||||||
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
||||||
Patch20: python-bundle-lang.patch
|
Patch20: python-bundle-lang.patch
|
||||||
|
Patch21: python-2.7.3-multiprocessing-join.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
%define python_version %(echo %{tarversion} | head -c 3)
|
%define python_version %(echo %{tarversion} | head -c 3)
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -142,6 +143,7 @@ other applications.
|
|||||||
%patch18
|
%patch18
|
||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
|
|
||||||
# drop Autoconf version requirement
|
# drop Autoconf version requirement
|
||||||
|
@ -49,6 +49,7 @@ Patch18: python-2.7.3-ssl_ca_path.patch
|
|||||||
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
||||||
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
||||||
Patch20: python-bundle-lang.patch
|
Patch20: python-bundle-lang.patch
|
||||||
|
Patch21: python-2.7.3-multiprocessing-join.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
Provides: pyth_doc
|
Provides: pyth_doc
|
||||||
Provides: pyth_ps
|
Provides: pyth_ps
|
||||||
@ -98,6 +99,7 @@ Python, and Macintosh Module Reference in PDF format.
|
|||||||
%patch18
|
%patch18
|
||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
@ -57,6 +57,7 @@ Patch18: python-2.7.3-ssl_ca_path.patch
|
|||||||
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
|
||||||
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
# PATCH-FEATURE-OPENSUSE python-bundle-lang.patch bnc#617751 dimstar@opensuse.org -- gettext: when looking in default_localedir also check in locale-bundle.
|
||||||
Patch20: python-bundle-lang.patch
|
Patch20: python-bundle-lang.patch
|
||||||
|
Patch21: python-2.7.3-multiprocessing-join.patch
|
||||||
# COMMON-PATCH-END
|
# COMMON-PATCH-END
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: db-devel
|
BuildRequires: db-devel
|
||||||
@ -181,6 +182,7 @@ implementation of the standard Unix DBM databases.
|
|||||||
%patch18
|
%patch18
|
||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
|
%patch21 -p1
|
||||||
# COMMON-PREP-END
|
# COMMON-PREP-END
|
||||||
|
|
||||||
# drop Autoconf version requirement
|
# drop Autoconf version requirement
|
||||||
|
Loading…
x
Reference in New Issue
Block a user