You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously we only captured the thread name as set by `prctl`, but not
the thread name as returned by `threading.current_thread().name`.
Begin capturing the name for the Python thread as well. We retain only
the last name set for each thread, so assignments to `Thread.name`
override earlier calls to `prctl(PR_SET_NAME)`, and vice versa.
This implementation uses a custom descriptor to intercept assignments to
`Thread._name` and `Thread._ident` in order to detect when a thread has
a name or a thread id assigned to it. Because this is tricky and a bit
fragile (poking at the internals of `Thread`), I've implemented that
descriptor in a Python module. At least that way if it ever breaks, it
should be a bit easier for someone to investigate.
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
0 commit comments