Why should I prefer one or another in practice?
What are technical differences except that std::thread
is a class?
std::thread
provides portability across different platforms like Windows, MacOS, and Linux.
As mentioned by @hirshhornsalz in the comments below and related answer https://stackoverflow.com/a/13135425/1158895, std::thread
may not be complete on all platforms yet. Even still, (it will be in the near future) it should be favored over pthread
's because it should make your application more future-proof.