-
Notifications
You must be signed in to change notification settings - Fork 51
Closed
Description
I'd like to review the thread safety of the SDK to make sure we don't have potential concurrency issues, particularly around state maintained in the global API object or clients. I'd like to confirm we have the required safeguards around the context, hooks, or any other state on these objects.
We may need some constraints or synchronization around setting context, hooks, etc.
Let's use this issue to investigate and discuss some of these.
UPDATE: after lots of discussion here and the recent changes here to make Context an interface, I think the basic outline of what needs to be done to resolve thread safety issues is:
- create an immutable implementation of
EvaluationContext - create a read/write lock on the global provider, global hooks, and the client hooks that allows n threads to read and 1 to write
- document thread safety in general, particularly use of the
ImmutableContext.
Metadata
Metadata
Assignees
Labels
No labels