As this happens almost always, the standard does not provide for any specific implementation, it simply requires that the exposed behavior conform to its rules.
Thus, a particular implementation is free to choose; on the other hand, it is likely that many implementations will be based on boost.thread (on which the std::thread clause is based), so we can consider it to have an idea.
This library uses pthreads in POSIX and Windows threads on Win32. Win32 threads are, of course, kernel threads, but pthreads themselves are another interface that can be implemented both in user space and in kernel space (although almost any recent UNIX kernel provides opportunities for their implementation in space kernels).
So: std::thread can be anything, although on the βmainβ PC operating systems / implementations it is very likely that you will get kernel threads. If for some reason you need to know more, check your compiler documentation.
Matteo italia
source share