Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有这个代码:
int thread_local y = 4; int main() { y++; return 0; }
y变量不在线程中(在函数中)使用是什么意思main- 没有产生线程?主线程是否也算作“普通”线程?
y
main
主线程是否也算作“普通”线程?
是的。