0
可能重复:
In g++ is C++ 11 thread model using pthreads in the background?C++ 11线程执行后端
我从某处OpenMP
使用在Linux系统中PThreads
实现。尽管他们似乎对我完全不同的阅读。考虑C++11
线程和PThreads
我想知道的(相对)相似,
有谁知道,如果C++11
线程使用PThreads
或gcc
或clang
任何其他的多线程库实现的?
OpenMP和PThreads可以混合在一起,但它们是两个不同的东西。你应该看看那里http://stackoverflow.com/questions/3949901/pthreads-vs-openmp和那里http://stackoverflow.com/questions/7433685/mixing-openmp-with-pthreads。 – ForceMagic
关于您对OpenMP和pthreads的评论。 OpenMP只是一组描述如何对应用程序进行线程化的语法和语义。 pthreads是一个实际上提供了线程化应用程序的库。 – CrazyCasta
是的,libg ++使用pthreads。我记得在编译时必须链接到它。 – Pubby