Is there any concurrency package for C-language?
I know Java and C# both have library package to support concurrency programming. Does anyone know whethe开发者_如何学运维r or not there is library package for C? Thanks
- Qt QThread
- pthread
- MPI (for computations on multiple computers)
- (more)
At the lowest level, you have pthreads, which give you threads, locks, condition variables, etc. It's about as basic as you can get. If your program uses a framework, it might provide its own threading primitives so you don't have to use pthreads directly.
- Qt Threading Support
- Glib threads (used by GTK)
- Boost threads (for C++)
Other packages provide higher-level concurrency operations that may be easier to reason about.
- Intel Threading Building Blocks
- OpenMP
- MPI
- QtConcurrent
There is OpenMP
which is supported by compilers like icc
, msvc
and gcc
(at least).
精彩评论