blob: ada8c850713b96ce604e7e54c44e8ecdea8c4f7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include "Thread.h"
#include <iostream>
#include <string>
int main() {
cru::Thread thread1([](const std::string &s) { std::cout << s; },
"Hello world! 1\n");
thread1.Join();
cru::Thread thread2([](const std::string &s) { std::cout << s; },
"Hello world! 2\n");
thread2.Join();
return 0;
}
|