On Thu, 17 Oct 2024, Antonin Décimo wrote:
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.
Using SetThreadDescription has the advantage that on recent Visual
Studio / Windows, the thread name is always available regardless of
whether a debugger was attached, and is also available in crash dumps
and to other tools.
Cf 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
Signed-off-by: Antonin Décimo <anto...@tarides.com>
---
I think the patch is fine. But the way the commit message starts out with
a quote, without knowing where the quote is from, makes it weird to read.
(When reading the mail I first wondered if this was a reply to an earlier
mail, quoting from that?)
So if you could add a brief paragraph before that quote to get the reader
into context first, I think it would read easier.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public