From this reference:
get_id
returns the id of the thread
and
native_handle
returns the underlying implementation-defined thread handle
The thread identifier as returned by get_id
should actually be a class (std::thread::id
) and not a number or other platform specific handle.
The native_handle
function returns just what its name implies, a native handle that can be used by the underlying operating systems thread functions. On Windows this is typically a HANDLE
as returned by CreateThread
, on POSIX platforms it's typically a pthread_t
as initialized by pthread_create
.