mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2024-11-23 01:44:43 +08:00
04ec40f5bc
Using SetThreadDescription has the advantage that on recent Visual Studio / Windows, the thread name is always available regardless of whether a debugger was attached, is also available in crash dumps, and to other tools. Quoting MSDN at Set a thread name in C/C++: https://learn.microsoft.com/en-us/visualstudio/debugger/tips-for-debugging-threads?view=vs-2022&tabs=csharp#set-a-thread-name-in-cc > There are two ways to set a thread name. The first is via the > SetThreadDescription function. The second is by throwing a > particular exception while the Visual Studio debugger is attached to > the process. Each approach has benefits and caveats. The use of > SetThreadDescription is supported starting in Windows 10 version > 1607 or Windows Server 2016. > > It's worth noting that both approaches can be used together, if > desired, since the mechanisms by which they work are independent of > each other. Signed-off-by: Antonin Décimo <antonin@tarides.com> Signed-off-by: LIU Hao <lh_mouse@126.com> |
||
---|---|---|
.. | ||
build-aux | ||
include | ||
m4 | ||
src | ||
tests | ||
tests_pthread | ||
.gitignore | ||
aclocal.m4 | ||
config.h.in | ||
configure | ||
configure.ac | ||
COPYING | ||
Makefile.am | ||
Makefile.in | ||
README |
The Winpthreads Library ----------------------- This library provides POSIX threading APIs for mingw-w64. For maximum compatibility, winpthreads headers expose APIs without the `dllimport` attribute by default. If your program is linked against the DLL, you may define the `WINPTHREADS_USE_DLLIMPORT` macro to add the `dllimport` attribute to all APIs, which makes function calls to them a bit more efficient.