File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -239,10 +239,11 @@ size_t PageSize() {
239
239
}
240
240
241
241
void SetThreadName (std::thread &thread, const std::string &name) {
242
- #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) || \
243
- defined (_GLIBCXX_GCC_GTHR_POSIX_H)
244
- (void )pthread_setname_np (thread.native_handle (), name.c_str ());
245
- #else
242
+ #ifndef __MINGW32__
243
+ // Not setting the thread name in MinGW environments. MinGW C++ standard
244
+ // libraries can either use native Windows threads or pthreads, so we
245
+ // don't know with certainty what kind of thread handle we're getting
246
+ // from thread.native_handle() here.
246
247
typedef HRESULT (WINAPI * proc)(HANDLE, PCWSTR);
247
248
HMODULE kbase = GetModuleHandleA (" KernelBase.dll" );
248
249
proc ThreadNameProc =
You can’t perform that action at this time.
0 commit comments