Pali Rohár <[email protected]> wrote: > On Wednesday 07 October 2026 12:15:00 Kirill Makurin wrote: >> The issue here that any existing instance of `thrd_t` for the thread will >> not be updated, and will contain old handle value. > > I think that this is not a problem because: > - every existing instance contains the required information about thread > (which is thread id) and this is always correct > - for comparing two instances is needed to use thrd_equal() function > which even in the vcruntime140_threads.dll is using the thread id (and > not thread handle) > - if needed, thread id can be converted to handle by opening a thread by > id (there is a winapi function for it) > > Maybe it is not easy to use this structure, but it contains all data for > thread identification and usage.
A thread that was detached with `thrd_detach` cannot be joined with `thrd_join` or vice versa; doing so is undefined behavior. Well, in case of MSVC implementation, it seems like it will actually work. - Kirill Makurin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
