一个简单的线程程序
#include <iostream>
#include <thread>
using namespace std;
void hello()
{
std::cout << "Hello Concurrent World\n";
}
int main()
{
thread t(hello);
t.join();
}
#include <iostream>
#include <thread>
using namespace std;
void hello()
{
std::cout << "Hello Concurrent World\n";
}
int main()
{
thread t(hello);
t.join();
}