Skip to content

Figure out a solution to state management #505

@bruno-garcia

Description

@bruno-garcia

Currently the SDK has a single Hub hanging off of an AsyncLocal static field.

This doesn't work in some cases, like through round trip through native code calling into C#.

Also, in Desktop and Mobile apps, it's more common to expect state to be shared across the app.
This is how our Android and Cocoa SDKs work.
Currenly the Hub will fork and data set on a copied AsyncLocal won't propagate to the root one. That works well for Server apps, but not for desktop/mobile.

See: #221, #448

Relates to #628 (or just a dupe)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions