兩種方式實現的用類管理線程的join。
RAII Thread Guard
通過引用來直接管理線程。
#include <thread>
#include <iostream>
class Stomach
{
public:
void Dislike() {
std::cout << "I can't stomach his
兩種方式實現的用類管理線程的join。
通過引用來直接管理線程。
#include <thread>
#include <iostream>
class Stomach
{
public:
void Dislike() {
std::cout << "I can't stomach his