Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-08-06 12:08:59

From: Peter Dimov <pdimov_at_[hidden]>
> From: "Alexander Terekhov" <terekhov_at_[hidden]>
> > > [1] No atomic_t, why?
> >
> >
> >
> I think that on win32, Interlocked* is supposed to be safe on multiple
> processors. On platforms that don't have atomic primitives an atomic_t will
> simply be a (mutex, long) pair.
> As it stands, to make shared_ptr thread safe, I have to roll my own
> atomic_t.

Or just customize the implementation of your reference counting
for each platform for which there exists a faster solution than
a monitor. As I understood it there is enough variation between
the "fastest way to reference count" on different platforms that
it is difficult to subsume them all into an atomic<T>.

Boost list run by bdawes at, gregod at, cpdaniel at, john at