Luca Bacci f4b53cacbf gthread-win32: No need to raise thread name exception if the debugger is not present
As outlined in [1], raising the exception without a debugger attached
isn't of any use, as the thread name won't be stored anywhere.
The system doesn't trap such exception, only debuggers.

This also fixes a TOCTTOU issue between the IsDebuggerPresent() check
and the RaiseException() call.

References:
 [1] - https://learn.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2022#set-a-thread-name-by-throwing-an-exception
2023-09-13 14:04:26 +02:00
..
2023-09-06 12:11:49 +00:00
2022-05-23 09:19:45 -04:00
2022-06-29 16:05:09 +02:00
2023-02-09 13:36:51 +00:00
2023-02-09 13:36:51 +00:00
2018-01-04 22:19:30 +01:00
2023-07-21 18:40:13 +01:00
2023-04-19 23:03:43 +02:00
2022-07-25 22:30:22 +01:00
2021-09-21 09:41:29 +00:00
2021-11-18 14:32:09 +00:00
2023-02-09 13:36:51 +00:00
2023-05-16 11:27:45 +01:00
2023-08-01 15:33:21 -03:00