Skip to content

Clarification on concurrency fix in feature flags (PR #4034) #4101

Answered by cmanallen
antoniobg asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for reaching out!

we were wondering why FlagBuffered is shared across contexts rather than being thread-local. Wouldn’t it make more sense for it to be per-context to avoid the need for locking?

The first order question being "why lock"? It solved a problem in a way I knew how to solve it. There's no deeper meaning to it than that. If this has caused deadlocks for you or performance degradation please open an issue and document the problem as best you can. We'll address as quickly as possible.

The original question being "Why share FlagBuffer across contexts". I don't think it should be shared but sharing it is a choice (or mistake) people make. In my opinion, the Scope should be…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@antoniobg
Comment options

@cmanallen
Comment options

@antoniobg
Comment options

Answer selected by antoniobg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants