Message280833
It's only in imap, in map it's ok. The following code explains the issue:
from multiprocessing.pool import ThreadPool
pool = ThreadPool(10)
def gen():
yield 1 + '1' # here is an error
try:
next((pool.imap(str, gen())))
except:
# Will be catched using pool.map normally, but using pool.imap will be not.
# Instead it hangs. This is the same for ThreadPool and Pool.
print('this will not be printed because thread is hanging') |
|
Date |
User |
Action |
Args |
2016-11-15 12:52:50 | lev-veshnyakov | set | recipients:
+ lev-veshnyakov |
2016-11-15 12:52:50 | lev-veshnyakov | set | messageid: <1479214370.8.0.751710549169.issue28696@psf.upfronthosting.co.za> |
2016-11-15 12:52:50 | lev-veshnyakov | link | issue28696 messages |
2016-11-15 12:52:50 | lev-veshnyakov | create | |
|