Created
August 30, 2019 09:27
-
-
Save danielhams/05a3ecb77181b69d6bf5fb563686d833 to your computer and use it in GitHub Desktop.
Simple CPP file using thread local variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <thread> | |
#include <iostream> | |
thread_local int a=0; | |
int main(int argc, char** argv) { | |
std::cout << "a=" << a << std::endl; | |
std::cout << "It worked!" << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment