-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
ThreadLocals and Finalization/GC #101839
Comments
Tagging subscribers to this area: @mangod9 |
Tagging subscribers to this area: @dotnet/gc |
The thread-local field might not be the only thing that refers to the same instance. In that case, it would be wrong to automatically dispose or finalize the referenced instance when the thread exits, unless the thread-local field is opted in somehow. (Perhaps a new |
Tagging subscribers to this area: @mangod9 |
When a thread exits; all its thread locals end up on the finalization queue (perhaps unsurprisingly)
However the runtime is controling when threads are exited; would it be possible it instead dispose all these locals as part of the thread exit so they don't all end up on the finalization queue?
The text was updated successfully, but these errors were encountered: