I am getting a C++ error with threading: terminate called without an active exception Aborted How to reproduce that error: #include <iostream> #include <stdlib.h> #include <string> #include <thread> using namespace std; void task1(…
最近在使用std::thread的时候,遇到这样一个问题: std::thread t(func); 如果不使用调用t.join()就会遇到 "terminate called whithout an active exception",但是在使用boost:thread的时候却没遇到这个问题,google了一下,找到答案: The trouble you are encountering is a result of the stopThread going out of scope…