Wednesday, July 25, 2007

boost::thread and boost::mutex tutorial

For most Boost's libraries its documentation requires you to read everything from the start to the end before you can write any code. Compare that with most of CPAN modules where usually you can start using CPAN module after quickly scanning synopsis and maybe description parts of it's POD documentation. POD documentation as a rule has good examples right on top of the page. Boost's documentation usually doesn't.

So I was looking for basic usage examples for boost::thread and boost::mutex classes and initially I couldn't find any because I was using wrong search keywords. In the end I figured out how to use boost::thread and boost::mutex classes in my application hard way by reading Boost documentation without relying on any examples. But afterwards I did find a very good article on this topic with many simple examples: The Boost.Threads Library on Dr.Dobb's. So I'm posting this link here for google. It is in top 10 hits for some relevant keywords but it is not for others (for example for boost thread mutex tutorial) and this is why I missed it initially. If my blog post helps any Boost.Threads newbie to get started then I would consider time spent writing this post to be not wasted.

10 comments:

Carl said...

Thanks.

Simon said...

Not wasted at all! Ta!

Eric said...

Thanks, your time was definitely not wasted and in fact has helped save time for at least one poor sap working his way through the Boost.Thread documentation.

Vike said...

Thank you.

Mortoc said...

Thanks! This page served its purpose perfectly for me.

Anonymous said...

Thanks! Wasnt a waste of time.

Ferreus said...

Thanks :)

Anonymous said...

Looks like you might have helped me a lot there too mate. Thanks a lot :D

Robin said...

Thanks !

Hal Vaughan said...

Thanks! I had been searching for stuff on C++ threads and hadn't found a good article or tutorial on them until I typed in "C++ threads boost tutorial" and got your page and followed the link.