/
githubmirror
/
CPlusPlusThings
Обзор
Документация
Войти
/
githubmirror
/
CPlusPlusThings
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
concurrency/concurrency_v1/chapter1/1_helloworld.cpp
20 строк
395 B
Light-City
update
03 мар 2020, 05:00
03 мар 2020, 05:00
16c12a3
Код
Авторство
О чём код?
// // Created by light on 19-11-5. // #include <iostream> #include <thread> #include <unistd.h> using namespace std; void hello() { cout << "hello world" << endl; } int main() { thread t(hello); t.join(); // must add this line otherwise will failed! // 需要注意的是线程对象执行了join后就不再joinable了,所以只能调用join一次。 return 0; }