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
This has bothered me quite a bit already: If some code calls threading.current_thread() in a thread that’s not created from the threading module it lingers at threading._active forever (or until another thread with the same thread.ident is created, which isn’t that uncommon).
My suggestion would be to remove it when the thread dies.
I'll provide a PR.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Feature or enhancement
Proposal:
This has bothered me quite a bit already: If some code calls threading.current_thread() in a thread that’s not created from the threading module it lingers at threading._active forever (or until another thread with the same thread.ident is created, which isn’t that uncommon).
My suggestion would be to remove it when the thread dies.
I'll provide a PR.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/remove-dummythread-from-threading-active-when-thread-dies/41322
Linked PRs
The text was updated successfully, but these errors were encountered: