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

Fix ThreadLocal tracking behavior #56956

Merged
merged 1 commit into from
Aug 10, 2021

Commits on Aug 6, 2021

  1. Fix ThreadLocal tracking behavior

    - Before this change the trackAllValues behavior for ThreadLocal<SomeParticularType> was defined by the first instance of thread local to have its value set on the thread
      - This could lead to unpredictable memory leaks (where the value was improperly tracked even though it wasn't supposed to be) This reproduces as a memory leak with no other observable behavior
      - Or data loss, where the Values collection was missing entries.
    - Change the model so that ThreadLocal<T> trackAllValues behavior is properly defined by the exact ThreadLocal<T> instance in use
    - Implement by keeping track of the track all changes behavior within the IdManager
    
    Fixes dotnet#55796
    davidwrighton committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    c1bee3c View commit details
    Browse the repository at this point in the history