Are you going to write OS dependent code? If so, then better use C for that since Linux and Windows have complete different API for system programming. If not OS dependent, then most C++ libs, especially those from C++ STL and boost libs are cross-platform which means code can run on both Windows and Linux.
C++ std::thread or boost::thread just wraps the underlying OS thread on Win32 thread (Windows) and pthread (Linux), respectively. So it's still OS dependent under the hood.
【在 d****i 的大作中提到】 : C++ std::thread or boost::thread just wraps the underlying OS thread on : Win32 thread (Windows) and pthread (Linux), respectively. So it's still OS : dependent under the hood.
Use Intel TBB if at all possible. This is the strategy taken by OpenCV, and it can multithread on Windows, Mac, Linux, Android, iOS If on Windows, one can define a thin wrapper to switch TBB code to Microsoft PPL.
【在 d****i 的大作中提到】 : C++ std::thread or boost::thread just wraps the underlying OS thread on : Win32 thread (Windows) and pthread (Linux), respectively. So it's still OS : dependent under the hood.