[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-06-07 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1b3d4ffcb4d1 by Richard Oudkerk in branch '3.2': Issue #12157: pool.map() does not handle empty iterable correctly http://hg.python.org/cpython/rev/1b3d4ffcb4d1 New changeset 3585cb1388f2 by Richard Oudkerk in branch 'default': Merge fixes for #138

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-06-06 Thread Richard Oudkerk
Changes by Richard Oudkerk : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2012-02-04 Thread Ross Lagerwall
Changes by Ross Lagerwall : -- nosy: +rosslagerwall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: >Don't Try to use any fancy way to check if the join will hang, > leave all the job to faulthandler. > Victor, do you agree with the simpler method, depending > on faulthandler to catch a hang in the test and fail it? > Or is the explicit timeout better? I

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: The patch to the multiprocessing code is trivial: +del cache[self._job] The difference in tests is +with test.support.operation_timeout(5): +p.join() versus +p.join() Victor, do you agree with the simpler method, dependi

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
mouad added the comment: Here is a new patch that in the opposite of the first one, it don't try to check if the pool.join() will hang or no, after a discussion with neologix in issue #12410 . -- ___ Python tracker

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Added file: http://bugs.python.org/file22475/issue-12157.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
mouad added the comment: The test case use a helper function in test/support.py that i have proposed in issue #12410. I'm dropping this comment here because i don't have the rights to edit the issue dependency. cheers; -- ___ Python tracker

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Added file: http://bugs.python.org/file22466/issue-12157.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Removed file: http://bugs.python.org/file22461/support.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Removed file: http://bugs.python.org/file22460/test_multiprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Removed file: http://bugs.python.org/file22459/pool.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
mouad added the comment: Hello, This is my first patch to cpython, hope it will be accepted :) The fix that i did is to remove the ResultMap instance from the pool cache when the iterable is empty. In general here is what happen: The "map" method create a MapResult instance, which add it s

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Added file: http://bugs.python.org/file22461/support.patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : Added file: http://bugs.python.org/file22460/test_multiprocess.patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread mouad
Changes by mouad : -- keywords: +patch Added file: http://bugs.python.org/file22459/pool.patch ___ Python tracker ___ ___ Python-bugs-

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-28 Thread Charles-François Natali
Charles-François Natali added the comment: When map is called, a MapResult object is created, which adds itself to the Pool's result cache. When the pool is shut down, the result handler thread waits until the cache drains (while cache and thread._state != TERMINATE). But since no result is p

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I ran with 3.2, winxp with "if __name__ == '__main__':" added after the def statement (without this, process spawned 150 processes before I got logged out) and ()s added to prints. Hung on pool.join as OP said. I could only stop by closing command window as ^

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-26 Thread Petri Lehtinen
Changes by Petri Lehtinen : -- nosy: +petri.lehtinen ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-05-23 Thread Gökçen Eraslan
New submission from Gökçen Eraslan : When I use map method Pool object with an empty list parameter and then call close and wait methods, join() method hangs. I think this is not intended. Code to reproduce the bug is attached. PS: A similar issue (using map method with an empty list argument