-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
thread_local: thread safety follow ups #13313
Comments
Just to avoid the indirection I'll paste my referenced comment here with context: to improve compile-time type safety, as well as less cumbersome usage, can we consider 2 changes:
Then one of the call-sites in source/common/stats/thread_local_store.cc changes from
to
I think the Slot mechanism itself doesn't to change at all to accommodate this templating layer. It can do what it does now, and the templating API can be a thin header-only layer above. |
Commit Message: Adds a new TypedSlot API, where the slot data is strongly typed. Also removes an unused capability to replace slot data with a new instance via the callbacks in runOnAllThreads. Use this new API rather than the untyped Slot API for one of the sites (stats thread_local_store.cc). This is a partial fix for #13313 Risk Level: low Testing: //test/... Docs Changes: n/a Release Notes: n/a Platform Specific Features: n/a Signed-off-by: Joshua Marantz <jmarantz@google.com>
A couple of follow ups to #12833:
The text was updated successfully, but these errors were encountered: