Boost logo

Boost :

From: Sudheer Tumuluru (stumuluru_at_[hidden])
Date: 2000-08-17 15:27:18


Hi,
    Is it advisable to use the shared_ptr<> class in a multithreaded
environment where there is a possibility of it being passed across
thread boundaries? I initially got the CountedPtr<> class from "The
C++ Standard Library: A Tutorial and Reference" by Nicolai M.
Josuttis (p. 222) and extended it to be thread-safe by adding a
mutex-lock (which is new'ed along with count) on the reference count.
But I am not sure if this is a good idea. Any thoughts or suggestions
on this?

Thanks in advance,
Sudheer Tumuluru


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk