$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-07-20 16:24:57
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...