[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-08-26 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: > On closer look your patch is also ignoring SystemExit. I think it's > beneficial to honor SystemExit, so a user could use this as a means to > replace the current process with a new one. Yes, SystemExit should cancel all the tasks that ar

[issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly

2010-08-26 Thread Andrey Vlasovskikh
Changes by Andrey Vlasovskikh : -- nosy: +vlasovskikh ___ Python tracker <http://bugs.python.org/issue9205> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-02 Thread Andrey Vlasovskikh
New submission from Andrey Vlasovskikh : multiprocessing.Pool methods map, imap, etc. are said to be able to normally handle exceptions. But it seems that it is true only for synchronous exceptions inside their first func arguments. When (typically during a long-running parallel map) a user

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-02 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: Yes, here is my test case. -- Added file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py ___ Python tracker <http://bugs.python.org/issue8

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-02 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: Yes, I've come up with the same solution by myself, but it cannot cover all the cases of the bug. It works only for cases when ^C is hit during a call to the users' function: http://stackoverflow.com/questions/1408356/keyboard-interrupts-wi

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-06 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: Despite of several workarounds available on the Web, the problem persists. Almost any exception that is rised in `worker` function while putting or getting tasks from queues result in Pool hang up. Currently, `worker` is only aware of Exception

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-06 Thread Andrey Vlasovskikh
Changes by Andrey Vlasovskikh : Removed file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py ___ Python tracker <http://bugs.python.org/issue8

[issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt

2010-04-06 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: Here is a patch that fixes this problem. Basically, it catches all the BaseExceptions that could happen during: a) getting a task from the `inqueue`, b) calling a user function, c) putting a task into the `outqueue`. The exception handler puts the

[issue1230540] sys.excepthook doesn't work in threads

2018-08-01 Thread Andrey Vlasovskikh
Change by Andrey Vlasovskikh : -- keywords: +patch pull_requests: +8116 stage: needs patch -> patch review ___ Python tracker <https://bugs.python.org/issue1

[issue1230540] sys.excepthook doesn't work in threads

2018-08-01 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: I've added a PR with a patch I developed during the EuroPython 2018 sprint. I've fixed this issue in a way that is more or less consistent with how '_thread' threads interact with sys.excepthook, but I haven't added the log line

[issue1230540] sys.excepthook doesn't work in threads

2018-08-04 Thread Andrey Vlasovskikh
Andrey Vlasovskikh added the comment: > Would it be possible to modify the default implementation of sys.excepthook > to have a different output when it's not called from the main thread? Mimick > the current traceback from threads. I agree it's a good idea to mimic wha