[issue41435] Allow to retrieve ongoing exception handled by every threads

Julien Danjou report at bugs.python.org
Wed Jul 29 11:39:46 EDT 2020


New submission from Julien Danjou <julien at danjou.info>:

In order to do statistical profiling on raised exception, having the ability to poll all the running threads for their currently handled exception would be fantastic.

There is an exposed function named `sys._current_frames()` that allows to list the current frame handled by CPython. Having an equivalent for `sys._current_exceptions()` that would return the content of `sys.exc_info()` for each running thread would solve the issue.

----------
components: Interpreter Core
messages: 374575
nosy: jd
priority: normal
severity: normal
status: open
title: Allow to retrieve ongoing exception handled by every threads
type: enhancement
versions: Python 3.10

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41435>
_______________________________________


More information about the Python-bugs-list mailing list