pthread and concurrent programming under ubuntu

Hello,

I would like to know what is the best way to develop concurrent applications in C++ under linux. I don't know whether to go for the Boost library of directly code using the Pthread C API.

Can anyone please kindly give their advice?

Is Boost the standard wrapper around Pthreads?

Thanks in advance,

Julien.
Yes, AFAIK, boost wraps Pthreads - don't know if I would call it a standard wrapper, though.

I have been using valgrind/drd/helgrind to check against race conditions, and I found too many false positives using boost, so I switched to direct pthreads, which is working great so far.
Thanks for your reply,
What do you mean by false positives? Can you please give examples of problems encountered?
Julien.
drd (and almost any race detection program) will flag race conditions when there is none.

Essentially, when boost and libc use non-standard ways of maintaining threads, race detectors have a difficult time keeping track of what's going on. Just try some simple examples yourself.

Check here for some discussions:
http://old.nabble.com/-drd--Race-condition-in-boost-thread-library--td28786561.html
http://www.cplusplus.com/forum/general/28949/

Ultimately, for valgrind/drd/helgrind to be useful, you will need to look deeply at each race condition and determine if you have a true or a false positive. If you determine it is a false positive, you can ask valgrind to produce a few lines to filter out those types of runs in the future.
I see...
thanks,
J.
Topic archived. No new replies allowed.