$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-11 11:47:55
From: "Wyss, Felix" <felixw_at_[hidden]>
> I implemented strong/weak reference ptr templates that we're using
internally. It uses a spin-lock similar to the one implemented by the
STLport sub-allocation manager and the locking overhead is very small (at
least on Win32, but I presume the same applies to any platform that has an
efficient atomic exchange operation).
<
I'd love to simply use a pthread_mutex/CRITICAL_SECTION (a critical section
is a 'foolproof spinlock', it spins for a while, then falls back to a mutex)
but people were (are) concerned about their efficiency.
Performance aside, I have to admit that the right design is probably to
allow weak->shared conversions (and not much else.)