fork download
  1. #include <thread>
  2. #include <condition_variable>
  3.  
  4. struct ThreadHandler {
  5. void operator()() { }
  6.  
  7. std::condition_variable cond;
  8. };
  9.  
  10. int main() {
  11. ThreadHandler th1;
  12. std::thread t1(std::ref(th1));
  13. t1.join();
  14. }
Success #stdin #stdout 0s 4412KB
stdin
Standard input is empty
stdout
Standard output is empty