Created
December 8, 2012 11:49
-
-
Save marionette-of-u/4239961 to your computer and use it in GitHub Desktop.
test std::thread
This file contains hidden or 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> | |
| std::thread a, b; | |
| void f(); void g(); void h(); | |
| void f(){ a = std::thread(g); } | |
| void g(){ b = std::thread(h); } | |
| void h(){} | |
| int main(){ | |
| f(); | |
| a.join(); | |
| b.join(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment