Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store thread additional info out of threading.Thread. #504

Closed
fabioz opened this issue Dec 19, 2020 · 0 comments
Closed

Store thread additional info out of threading.Thread. #504

fabioz opened this issue Dec 19, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@fabioz
Copy link
Collaborator

fabioz commented Dec 19, 2020

This is a refactoring meant to protect against future issues such as: #492 ('NoneType' object has no attribute 'additional_info'.

The main reason this error happens is because internally the thread information is stored in the threading Threads, but it's not ideal to rely on it because its lifecycle isn't great for the debugger (which may debug things before/after it's actually created and needs to be extremely careful not to create dummy threads).

So, the idea would be creating a separate structure to hold that information.

A plain thread-local storage doesn't work out of the box because we may have to access/mutate that information from different threads, although it'd be nice to have something along those lines (I still need to investigate a bit more here as there are some corner cases to deal with).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants