Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Locks and Mutexes in C++ [closed]

Tags:

c++

mutex

I have learnt C++ for a while and still didn't come across good book which would explain what are those beasts? Are they integral C++ feature? If so how is it that they are only mentioned in such book like The C++ Programming Language by B.S. If not, where can you get reliable information about them - prefferably a book (don't really like web tutorials), how to define them, how to use them etc. Thank you for any valuable help.

like image 781
There is nothing we can do Avatar asked Nov 26 '09 14:11

There is nothing we can do


1 Answers

Locks and Mutexes are concurrency constructs used to ensure two threads won't access the same shared data at the same time, thus achieving correctness.

The current C++ standard doesn't feature concurrency tools.

Although you mentioned you prefer books to online tutorials, Herb Sutter's Effective Concurrency column is definitely a must read.

There is also Anthony Williams's upcoming book called C++ Concurrency in Action. Anthony Williams is the author of the Boost.Thread library.

Another threading library worth a look is Intel's TBB.

like image 109
Gregory Pakosz Avatar answered Oct 10 '22 09:10

Gregory Pakosz