
20 Jul
2007
20 Jul
'07
8:24 p.m.
Michael Caisse wrote:
Phillip Hellewell wrote:
<---- snip ---->
Is this a good solution that could maybe be made part of boost, in such a way that it is guaranteed to work and be safe?
Or is there a better solution?
How about using boost::shared_ptr. Something like this in your class instead:
boost::shared_ptr< boost::recursive_mutex > myMutex;
Then you would protect both copies of the resource that is part of the class by a single (shared) mutex. That doesn't sound right. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin...