📅  最后修改于: 2022-03-11 14:44:58.790000             🧑  作者: Mango
std::vector grp;
// to create threads
grp.emplace_back(functor); // pass in the argument of std::thread()
void join_all() {
for (auto& thread : grp)
if (thread.joinable())
thread.join();
}