Author fmitha
Recipients fmitha
Date 2012-01-19.20:46:39
SpamBayes Score 2.07053e-11
Marked as misclassified No
Message-id <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation in 
http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool

says

"""class multiprocessing.pool.AsyncResult¶
The class of the result returned by Pool.apply_async() and Pool.map_async().

get([timeout])
Return the result when it arrives. If timeout is not None and the result does not arrive within timeout seconds then multiprocessing.TimeoutError is raised. If the remote call raised an exception then that exception will be reraised by get()."""

Consider the example code

################################

from multiprocessing import Pool

def go():
    print 1
    raise Exception("foobar")
    print 2

p = Pool()
x = p.apply_async(go)
x.get()
p.close()
p.join()

###########################

The traceback from this is

Traceback (most recent call last):
  File "<stdin>", line 10, in <module>
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 422, in get
    raise self._value
Exception: foobar
1

As is clear in this example, this is not a full traceback - it only shows the traceback to the line where get is located and gives no further information. This is the case in all the other places I have used get. It seems to me that it *should* return the full traceback, which may contain important information missing in such a partial one. I don't know whether one would call this a feature request or a bug report. Maybe there is some technical reason why this is not possible, but I can't think of one.
History
Date User Action Args
2012-01-19 20:46:40fmithasetrecipients: + fmitha
2012-01-19 20:46:40fmithasetmessageid: <1327006000.05.0.152231015377.issue13831@psf.upfronthosting.co.za>
2012-01-19 20:46:39fmithalinkissue13831 messages
2012-01-19 20:46:39fmithacreate