10 Apr
2005
10 Apr
'05
4:21 p.m.
Peter Dimov wrote:
Rene Rivera wrote: [...] This is not equivalent to the above scenario. You can't have two threads calling lock() at the same time, because a scoped_lock object (as currently specified) is not thread safe (whereas a mutex is, by its very nature.) [...] This is also not quite equivalent to the original. In it, a lock() op1() op2() unlock() is a transaction; no other thread can inject its own op3 between op1 and op2.
Just goes to show how easy it is to shoot the foot off :-) -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org