c++ - What does it mean that thread_local is not used inside thread? -


there code:

int thread_local y = 4;  int main() {    y++;    return 0; } 

what mean variable y used not in thread (in main function) - there no threads spawned? main thread counted "normal" thread?

is main thread counted "normal" thread?

yes.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

What is the difference between data design and data model(ERD) -

ios - Can NSManagedObject conform to NSCoding -