I prefer a lib solely based on pthreads. What is a good c++ lib to for threading?
+10
A:
How about boost threads?
Boost.Thread enables the use of multiple threads of execution with shared data in portable C++ code. It provides classes and functions for managing the threads themselves, along with others for synchronizing data between the threads or providing separate copies of data specific to individual threads.
Stephen Pape
2009-02-27 19:59:59
+1
A:
- Boost Threads seems a pretty obvious suggestion.
- Also if you need some concurrency, but don't want to play that much with the threads, than maybe Futures (see also Boost mailing lists)?
Anonymous
2009-02-27 20:00:22
+1
A:
Also, also, if you need some concurrency, but don't want to play that much with the threads, then you could look at Thread Building Blocks.
rotoglup
2009-02-27 20:07:29
+5
A:
I looked at some options some time ago. Here are some:
- Boost Thread - This is the most standard choice. Boost is the most standard library for C++, that is not in the official standard.
- POCO - Has thread support and a lot more. Is my preferred choice because it lets you set thread priorities, something boost doesn't support. Thread priorities are important for my application domain (soft real-time).
- Zthread - Looks a good library. I have no experience with it.
- ACE - Well known library. I have no experience with it.
Then you have libraries that let you operate at an higher abstraction level like Thread Buildings Blocks.
Dani van der Meer
2009-02-28 05:19:50