Pali Rohár <[email protected]> wrote:

> On Wednesday 07 October 2026 08:45:57 Kirill Makurin wrote:
>> LIU Hao wrote:
>> > The Microsoft `thrd_t` is a structure of two fields: the handle is for 
>> > `thrd_join()`, and the numeric
>> > identifier is for `thrd_equal()`. But there still be issue if 
>> > `thrd_detach(thrd_current())` is called.
>>
>> Maybe following MSVC ABI is not the best idea after all...
>
> vcruntime140_threads.dll implementation does support 
> thrd_detach(thrd_current()).
>
> thrd_current() returns NULL handle with the correct thread id.

The issue here that any existing instance of `thrd_t` for the thread will not 
be updated, and will contain old handle value.

> But it does not mean that there cannot be other thrd_detach()
> implementation which will use same above memory/struct ABI but will
> implement thrd_detach() differently to support also thrd_current().

- Kirill Makurin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to