
9 Jul
2009
9 Jul
'09
6:37 p.m.
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Gottlob Frege
I don't think lock/unlock on each -> call is typically a good idea. x = p->x; y = p->y; That's 2 lock unlock sequences instead of one. Inefficient and what if y changes after you read x? It hides the locking too much, potentially leading to abuse and mistakes.
Tony
I agree and disagree. I would at some point want to create a class similar to what's being described, but would not expose it to the rest of the world to use ( and abuse ). A class like that could come in handy, as long as it's used with the knowledge of its strengths and limitations. -Sid Sacek