From 6a7785d9d9734b1bae937a80dc85844c7fc55f2f Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sat, 13 Mar 2021 19:02:20 -0800 Subject: [PATCH] no set thread name on mingw --- ixwebsocket/IXSetThreadName.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ixwebsocket/IXSetThreadName.cpp b/ixwebsocket/IXSetThreadName.cpp index cf746127..40faf9d9 100644 --- a/ixwebsocket/IXSetThreadName.cpp +++ b/ixwebsocket/IXSetThreadName.cpp @@ -37,24 +37,22 @@ namespace ix void SetThreadName(DWORD dwThreadID, const char* threadName) { +#ifndef __GNUC__ THREADNAME_INFO info; info.dwType = 0x1000; info.szName = threadName; info.dwThreadID = dwThreadID; info.dwFlags = 0; -#ifndef __GNUC__ __try { -#endif RaiseException( MS_VC_EXCEPTION, 0, sizeof(info) / sizeof(ULONG_PTR), (ULONG_PTR*) &info); } -#ifndef __GNUC__ __except (EXCEPTION_EXECUTE_HANDLER) -#endif { } +#endif } #endif