On POSIX systems there is the pthread library. Pretty easy to use. At least on Linux I think std::thread is just a wrapper for pthread.
C++
The center for all discussion and news regarding C++.
Rules
- Respect instance rules.
- Don't be a jerk.
- Please keep all posts related to C++.
C++11 just standardized boost::thread
, which has been a thing since ... at least 2001. Which was the same year POSIX standardized threads. Boost itself dates back to 1998, the same year C++ standardized.
Documentation prior to Boost 1.31 is hard to find.
I should have expected that STL threads came from boost. I feel like the committee sometimes makes questionable decisions regarding what parts of Boost to standardize (I have yet to find a legitimate use case for std::any), but threads were a good decision.
Most multi-threaded software was OS-specific, so they just used the OS threading utilities directly. Most serious multi-platform software writes their own abstraction on top of threads anyway.