文章来源:
恋恋风辰的编程笔记
https://gitbookcpp.llfc.club/sections/cpp/concurrent/concpp02.html

容器存储:
thread类没有拷贝构造函数,所以使用容器存储它时,不能使用push_back(),需要使用

点击查看代码
void use_vector() {
    std::vector<std::thread> threads;
    for (unsigned i = 0; i < 10; ++i) {
        threads.emplace_back(param_function, i);
    }

    for (auto& entry : threads) {
        entry.join();
    }
}

面试可能会问到:
一个类实现了移动构造函数,使用move时会调用移动构造函数,如果仅仅实现了拷贝构造函数,那么使用move时会调用拷贝构造函数,而不是系统提供的移动构造函数(c++为一个类实现拷贝构造函数,系统还会自动生成移动构造函数吗?这个问题不知道,但是也无所谓,不影响面试回答)