diff --git a/python-2.7.3-multiprocessing-join.patch b/python-2.7.3-multiprocessing-join.patch new file mode 100644 index 0000000..c137287 --- /dev/null +++ b/python-2.7.3-multiprocessing-join.patch @@ -0,0 +1,36 @@ + +# HG changeset patch +# User Richard Oudkerk +# 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') diff --git a/python-base.changes b/python-base.changes index af473a8..a8e3720 100644 --- a/python-base.changes +++ b/python-base.changes @@ -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) ------------------------------------------------------------------- diff --git a/python-base.spec b/python-base.spec index 494f0e0..191c66e 100644 --- a/python-base.spec +++ b/python-base.spec @@ -52,6 +52,7 @@ Patch18: python-2.7.3-ssl_ca_path.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. Patch20: python-bundle-lang.patch +Patch21: python-2.7.3-multiprocessing-join.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -142,6 +143,7 @@ other applications. %patch18 %patch19 -p1 %patch20 -p1 +%patch21 -p1 # COMMON-PREP-END # drop Autoconf version requirement diff --git a/python-doc.spec b/python-doc.spec index 249682c..e57acd9 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -49,6 +49,7 @@ Patch18: python-2.7.3-ssl_ca_path.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. Patch20: python-bundle-lang.patch +Patch21: python-2.7.3-multiprocessing-join.patch # COMMON-PATCH-END Provides: pyth_doc Provides: pyth_ps @@ -98,6 +99,7 @@ Python, and Macintosh Module Reference in PDF format. %patch18 %patch19 -p1 %patch20 -p1 +%patch21 -p1 # COMMON-PREP-END %build diff --git a/python.spec b/python.spec index 19581dd..e59ea7b 100644 --- a/python.spec +++ b/python.spec @@ -57,6 +57,7 @@ Patch18: python-2.7.3-ssl_ca_path.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. Patch20: python-bundle-lang.patch +Patch21: python-2.7.3-multiprocessing-join.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -181,6 +182,7 @@ implementation of the standard Unix DBM databases. %patch18 %patch19 -p1 %patch20 -p1 +%patch21 -p1 # COMMON-PREP-END # drop Autoconf version requirement