在 2019/7/2 下午8:00, Jonathan Wakely 写道:
> The C++ standard says:
> 
> "The library may reuse the value of a thread::id of a terminated
> thread that can no longer be joined."
> 
> So that's not a reason to use a handle.

According to MSDN [1] a thread ID is valid 'until the thread has been
terminated' so I presume a terminated but unclosed thread does not have
a thread ID.

This could also mean that there is no effect way to denote a thread
uniquely. As a consequence libstdc++ may have to its own bookkeeping
mechanism.


[1]
https://docs.microsoft.com/en-us/windows/desktop/ProcThread/thread-handles-and-identifiers

-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to