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

Change multi-threading behavior of caches (AbstractTypeDicts). #549

Merged
merged 1 commit into from
May 13, 2019

Commits on May 13, 2019

  1. Change multi-threading behavior of caches (AbstractTypeDicts).

    Fix #548.
    
    This is a breaking change, although I doubt that a lot of people have
    been relying on this behavior up to this point.
    
    Previously, `AbstractTypeDict` subtypes such as `StateCache`,
    `DynamicsResultCache`, and `SegmentedVectorCache` would use the thread
    ID for the thread in which the value (e.g. `MechanismState`) was created as part
    of the key. This was not needed for thread-safety (a misunderstanding on
    my part), and led to some unexpected behavior (#548) as it wasn't
    documented properly. I also now consider it to be a poor separation of
    concerns: `AbstractTypeDict` should just be `Dict`-like, and `Dict`
    doesn't do anything special in the presence of multiple threads.
    
    See the following comments for more info on the past behavior and the
    change:
    
    * #548 (comment)
    * #548 (comment)
    tkoolen committed May 13, 2019
    Configuration menu
    Copy the full SHA
    efa1a27 View commit details
    Browse the repository at this point in the history