Date: 2001-08-21 11:56:12
--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "William Kempf" <williamkempf_at_h...>
> > So, what you really want is not an atomic_t type, but a ref_count
> Yes, exactly. When I looked at the atomic_t documentation I was
> the impression that this is exactly the type I need for a reference
> (It had win32 Interlocked* semantics, AFAICS.) Apparently I
The Win32 Interlocked* semantics are not enough to insure a proper
ref-counting implementation... especially when you talk portably.
Alexander tried to point this out with the links he posted. The fact
that InterlockedIncrement and InterlockedDecrement are enough on IA32
is just a (un)happy coincidence. Ref-counting is a higher level
concept than an atomic integer.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk