
8 Jun
2006
8 Jun
'06
10:58 p.m.
Bardur,
Um. Maybe I'm missing something here, but this doesn't make any sense to me at all. The whole point of scoped_lock is that the lifetime of the mutex and scoped_lock lifetimes are *different*. Furthermore, you're not actually locking anything with your Lock class... you'd simply get a different mutex for each instance of Lock you create.
In short: You'd need two wrapper classes, one for scoped_lock and one for mutex. Which means you might as well just use boost::mutex and boost::scoped_lock.
That was it exactly ... makes perfect sense, and now my unit test works. Many thanks! Regards, John Falling You - exploring the beauty of voice and sound http://www.fallingyou.com