Skip to content

Use ScopeValues instead of TLS for geometry resolution context #360

Open

Description

@parrangoiz

Note: only relevant after #328 merges.

#328 introduces a "context manager" for use during schematic rendering that serves two purposes: it provides error recovery logic (for now, this just means logging the error via a callback), as well as a cache for component geometry. The callback and the cache are made available to the running task via task_local_storage(), but as Greg pointed out, the "textbook" way of doing this is with a ScopedValue. However, ScopedValues are only available in Base in Julia 1.11; before that they have be used via a separate package. If we do this, I suggest dropping support for <=1.10 so that we don't take on an extra dependency.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions