mirror of
https://github.com/changkun/modern-cpp-tutorial.git
synced 2025-12-17 12:44:40 +03:00
see #2: revision of parallelism and concurrency
This commit is contained in:
19
code/7/7.1.thread.basic.cpp
Normal file
19
code/7/7.1.thread.basic.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// 7.1.thread.basic.cpp
|
||||
// chapter 7 parallelism and concurrency
|
||||
// modern c++ tutorial
|
||||
//
|
||||
// created by changkun at changkun.de
|
||||
// https://github.com/changkun/modern-cpp-tutorial
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
|
||||
int main() {
|
||||
std::thread t([](){
|
||||
std::cout << "hello world." << std::endl;
|
||||
});
|
||||
t.join();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user