$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Boris Fomitchev (fbp_at_[hidden])
Date: 2000-01-06 17:14:11
Aleksey, your method should work ( I would still check this
addding printout statements).
No matter how wonderful such a method is and how useful
it could be to implement, say, synchronized containers,
my point was that using mutexes to synchronize shared_ptr
reference counting is a huge overkill - instead of changing
one instruction from simple increment to atomic one,
you would _add_ new data members and mutex syncronization
which is much more that atomic increment. Also, shared_ptr
does not neeed to be fully synchronized, only assignment does.
-Boris.
Aleksey Gurtovoy wrote:
> From: Andy Glew <glew_at_[hidden]>
>
> > A challenge:
> >
> > It sure would be nice if we could write, in C++, a template
> > mutexed<T>
> > that ensured full mutually exclusion for any arbitrary type T.