阅读背景:

在c++ 11中,thread_local意味着什么?

来源:互联网 

I am confused with the description of thread_local in C++11. My understanding is, each thread has unique copy of local variables in a function. The global/static variables can be accessed by all the threads (possibly synchronized access using locks). And the thread_local variables are visible to all the threads but can only modified by the thread for which they are defined? Is it correct? I am confused with the description of thread_lo




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: