Microsoft C++ 异常: std::system_error std::thread

         第一次使用std::thread,把之前项目里面的Windows的thread进行了替换,程序退出的然后发生了std::system_error。

         经过调试,发现std::thread ,join了两次导致的(一次是手动调用UnInit,一次是在析构函数又调用了UnInit)。而Windows,closehandle时进行了NULL的校验。

         使用std::thread的时候要小心,当thread被join或者detach后,避免再进行操作。

原文地址:https://www.cnblogs.com/xuhuajie/p/8691723.html