thread group c 2b 2b

Solutions on MaxInterview for thread group c 2b 2b by the best coders in the world

showing results for - "thread group c 2b 2b"
Matthew
11 Oct 2020
1  std::vector<std::thread> grp;
2
3  // to create threads
4  grp.emplace_back(functor); // pass in the argument of std::thread()
5
6  void join_all() {
7    for (auto& thread : grp)
8      if (thread.joinable())
9        thread.join();
10  }
11