Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-17 20:38:21


I've made some pretty extensive changes to the implementation of shared_ptr.
It now uses a lock-free algorithm (originally invented by Alexander
Terekhov) on Windows, and the old detail/shared_count.hpp has been
refactored into a number of smaller headers. A per-count pthread_mutex is
still being used on non-Windows platforms, but this is also going to change
soon.

Now is the time to test the new implementation; please report any errors you
encounter. Some of you have posted patches against the old implementation;
these will need to be reexamined, too.

detail/lightweight_mutex will also change "soon"; it will just map into a
CRITICAL_SECTION or a pthread_mutex depending on the platform. The spin
locks will disappear. shared_ptr no longer uses lightweight_mutex.

If you use some of the undocumented features of shared_ptr -
BOOST_SP_USE_STD_ALLOCATOR, BOOST_SP_ENABLE_DEBUG_HOOKS, sp_collector.cpp -
please say so. During the refactoring I may drop some of these features in
order to simplify and streamline the implementation.

Thanks,

--
Peter Dimov
http://www.pdimov.com 

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