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

Scoped values #50958

Merged
merged 2 commits into from
Sep 16, 2023
Merged

Scoped values #50958

merged 2 commits into from
Sep 16, 2023

Commits on Sep 15, 2023

  1. Add ScopedValues

    ScopedValues are containers whose observed value depends the current
    dynamic scope. This implementation is inspired by https://openjdk.org/jeps/446
    
    A scope is introduced with the `scoped` function that takes a lambda to
    execute within the new scope. The value of a `ScopedVariable` is
    constant within that scope and can only be set upon introduction
    of a new scope.
    
    Scopes are propagated across tasks boundaries.
    
    Variable storage is implemented using a persistent dictionary. Upon
    scope entry a small amount of data is copied and the unchanged pieces
    are shared.
    vchuravy committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    98074e0 View commit details
    Browse the repository at this point in the history
  2. Update base/scopedvalues.jl

    vchuravy committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    b758054 View commit details
    Browse the repository at this point in the history