Talk:cpp/thread/thread/id/hash
From cppreference.com
is there any guarantees to uniqueness of the hash? Can two distinct thread_id's produce same hash value? 50.252.37.97 18:15, 11 January 2018 (PST)
- They can with low probability (approaching 1.0/std::numeric_limits<size_t>::max()) --Ybab321 (talk) 02:04, 12 January 2018 (PST)
- Shame... Then you can't use it for OpenSSL's thread_id callback (see CRYPTO_THREADID_set_callback/CRYPTO_set_id_callback). Have to use non-portable stuff50.252.37.97 15:01, 12 January 2018 (PST)