What are the differences between std::thread and pthread
* Answer:
The
std::thread
library is implemented on top of pthreads in an environment supporting pthreads std::thread
provides portability across different platforms like Windows, MacOS, and Linux, but may not be complete on all platforms yet.
The C++11
std::thread
class unfortunately doesn't work reliably (yet) on every platform, even if C++11 seems available.
* Reference:
http://stackoverflow.com/questions/13134186/c11-stdthreads-vs-posix-threads
沒有留言:
張貼留言