Choosing among the Linux options
Hi,
I'm looking for a comparison of the different existing solutions to multithreading on Linux with C++.
I know that several libraries exist, but I have no idea of the main advantages and drawbacks of each one. Can anyone point me in the right direction?
Cheers
Re: Choosing among the Linux options
Some of the more common ones....
pthreads - Widely used, but C-based, so it isn't the most elegant for use with C++. Pretty simple though if you don't mind a few void*s.
Boost Threads - A C++ based library so it's fully type-safe. Introduces a dependency on Boost though, which not everyone will like.
gthreads - Part of glib. Basically a thin wrapper around pthreads, but some might find the interface more intuitive.
C++1x standard threads - I don't think these are supported yet, but they soon will be, so they're something you need to consider.
Re: Choosing among the Linux options
Thanks, I'll have a look at those