Replacing all TLS variants with the C++11 thread_local#24247
Replacing all TLS variants with the C++11 thread_local#24247veblush merged 2 commits intogrpc:masterfrom
Conversation
9536538 to
e74415d
Compare
a78f8c6 to
d973774
Compare
51a052f to
a1a44c1
Compare
|
While I'm liking that we're finally working on fixing #13856, before we proceed I'd like to get a clarification on whether this will affect performance when C-core library is loaded dynamically? (e.g. some wrapped language do rely on using dlopen / dlsym to load C core).) |
|
@jtattermusch That's good point. This article is good to understand why dynamic linking has a different performance for TLS in general. This applies for both |
yashykt
left a comment
There was a problem hiding this comment.
just minor nits otherwise lgtm
|
Was this reverted? Version 1.33.0 works for me but neither 1.33.1 nor 1.33.2 work for me. |
|
@kalbasit It's still here and I don't think there were relevant changes between 1.33.0 and 1.33.1+. |
This PR is trying to replace all TLS variants (gcc, msvc, pthread) with the C++11
thread_local. This helps simplify all complicated TLS implementations. There was a previous attempt (#20413) but rejected because it required the XCode and iOS bump. Let's revisit this along with required platform upgrade (Apple #24282, Android #24283)Unlike the original attempt, C++ TLS is implemented as one of TLS variants for incremental adoption. This begins with all major platforms such as Linux, Mac, Windows, and Mobile and will cover all other platforms.
Related Issues