[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-25 Thread Davin Potts
Davin Potts added the comment: Closing this issue -- all further discussion moves to issue28699 -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-17 Thread Xiang Zhang
Xiang Zhang added the comment: In Py3.6, it raises error: >>> next((pool.imap(str, gen( Traceback (most recent call last): File "/opt/lib/python3.7/multiprocessing/pool.py", line 684, in next item = self._items.popleft() IndexError: pop from an empty deque During handling of the

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-16 Thread Davin Potts
Changes by Davin Potts : -- superseder: -> Imap from ThreadPool behaves unexpectedly ___ Python tracker ___

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: Yes, I'm free to move to 3.5, now I'm seeing isn't there any problems in 3.5 according to this issue. -- ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Davin Potts
Davin Potts added the comment: If it only occurs in 3.4.x, is moving to 3.5 an option for you? -- versions: -Python 3.5 ___ Python tracker ___

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: It's hanging in a while loop in _handle_workers, /usr/lib/python3.4/multiprocessingpool.py:365. I can't figure out what is the reason. @staticmethod def _handle_workers(pool): thread = threading.current_thread() # Keep maintaining workers until the

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: I've reproduced it on 2 different machines: - on a MacBook in Docker (debian:jessie, python 3.4.2) - on another desktop (Ubuntu 14.04.1, 3.16.0-77-generic, x86_64, python 3.4.3) -- ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: So, I've checked twice, it's presented by me on python 3.4.3, and not by 3.5.2. So I will go deaper -- ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
Lev Veshnyakov added the comment: Ubuntu 14.04 LTS, 3.13.0-83-generic, x86_64 -- ___ Python tracker ___ ___

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Davin Potts
Davin Potts added the comment: Using the supplied example, I was unable to reproduce what you described using either 3.5 or 3.6-beta on OS X 10.11. What platform are you using? (Perhaps it is platform specific.) -- nosy: +davin ___ Python tracker

[issue28696] imap from ThreadPool hangs by an exception in a generator function

2016-11-15 Thread Lev Veshnyakov
New submission from Lev Veshnyakov: 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