Fix race condition causing crashes/undefined behaviour on thread init on windows/MinGW

This commit is contained in:
Jonathan G Rennison
2019-04-12 23:10:32 +01:00
parent ab157ea07f
commit 601f3aaef4

View File

@@ -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);