
17 Feb
2006
17 Feb
'06
11:07 a.m.
Dhanvi Kapila wrote:
Hi : I have this piece of code for mutex operations. is this code thread-safe ?
Thread-safety aside, what is the use of this code? Why not just use a shared_ptr<mutex> and construct the lock objects on the stack, as they're supposed to be (and as is exception-safe, unlike your object)? Sebastian Redl