For example:
例如:
struct A {
void run1() {}
void run2() {}
};
int main()
{
A a;
thread t1(bind(&A::run1, ref(a)));
thread t2(bind(&A::run2, ref(a)));
// not joinable thread!
int i;
std::cin >> i;
}
struct A {
void run1()For example:
例如:
struct A {
void run1() {}
void run2() {}
};
int main()
{
A a;
thread t1(bind(&A::run1, ref(a)));
thread t2(bind(&A::run2, ref(a)));
// not joinable thread!
int i;
std::cin >> i;
}
struct A {
void run1()