Fix race condition causing crashes/undefined behaviour on thread init on windows/MinGW
This commit is contained in:
@@ -86,7 +86,7 @@ inline bool StartNewThread(std::thread *thr, const char *name, TFn&& _Fx, TArgs&
|
|||||||
} catch (...) {
|
} catch (...) {
|
||||||
NOT_REACHED();
|
NOT_REACHED();
|
||||||
}
|
}
|
||||||
}, name, std::forward<TFn>(_Fx), std::forward<TArgs>(_Ax)...);
|
}, std::forward<const char *>(name), std::forward<TFn>(_Fx), std::forward<TArgs>(_Ax)...);
|
||||||
|
|
||||||
if (thr != nullptr) {
|
if (thr != nullptr) {
|
||||||
*thr = std::move(t);
|
*thr = std::move(t);
|
||||||
|
Reference in New Issue
Block a user