[Bug 747794] New: Python multiprocessing.pool: Thread tries to join itself
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c0
Summary: Python multiprocessing.pool: Thread tries to join
itself
Classification: openSUSE
Product: openSUSE 12.1
Version: Final
Platform: All
OS/Version: openSUSE 12.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Development
AssignedTo: bnc-team-screening@forge.provo.novell.com
ReportedBy: Yarny@public-files.de
QAContact: qa@suse.de
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20100101
Firefox/10.0.1
When pool objects (from the multiprocessing module) are close()'d, sometimes
one of the threads that handle the processes tries to join itself. The
threading module wisely prohibits this and instead raises an exception. The
result is an ugly error message for the user.
Reproducible: Always
Steps to Reproduce:
from multiprocessing import Pool
for d in range(2):
p=Pool(2)
p.close()
Actual Results:
Exception RuntimeError: RuntimeError('cannot join current thread',) in
worker_handler.join()
It was added by this commit: URL:http://hg.python.org/cpython/rev/dfc61dc14f59 My solution/workaround is to change this line to
if worker_handler!=threading.current_thread(): worker_handler.join()
but I don't understand the meaning of this join()ing anyway, so I can't judge whether this might break something. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c1
--- Comment #1 from kk zhang
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c
kk zhang
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c2
Yarny Yarny
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c
kk zhang
https://bugzilla.novell.com/show_bug.cgi?id=747794
https://bugzilla.novell.com/show_bug.cgi?id=747794#c3
Jan Matejek
participants (1)
-
bugzilla_noreply@novell.com