Boost logo

Boost :

Subject: Re: [boost] Does lock-free boost::shared_ptr<T> implementation exist?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-07-12 12:11:44


Anqing Xu wrote:
> I'm trying to find a production quality lock free reference counted pointer implementation and boost::shared_ptr seems promising. However boost::atomic_is_lock_free(shared_ptr) returns false on Windows. I'm going to try on SUSE linux soon.
> According to,
> Starting with Boost release 1.33.0, shared_ptr uses a
> lock-free
> implementation on the following platforms:
> GNU GCC on x86 or x86-64;
> GNU GCC on IA64;
> Metrowerks CodeWarrior on PowerPC;
> GNU GCC on PowerPC;
> Windows.
> Then why does boost::atomic_is_lock_free(shared_ptr) returns false?

atomic_is_lock_free indicates whether atomic operations on the
shared_ptr object
are lock-free. The reference count is lock free.

In Christ,
Steven Watanabe

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