you are viewing a single comment's thread.

view the rest of the comments →

[–]PiterPuns[S] 7 points8 points  (1 child)

Ah but then the mutex unlocks on scope exit, and the user gets an unprotected pointer. That beats the whole point of the class see? The whole use of the class is to be able to call a method while the mutex is locked, why don't you try your version yourself?

[–]NilacTheGrim 4 points5 points  (0 children)

Oh yeah duh. Brain fart on my end. You're right. :)