Boost logo

Boost :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2006-08-01 17:07:46

On 8/1/06, Dave Compton <abcdave_at_[hidden]> wrote:

> Is it enough to use an atomic counter? It seems like the entire
> decrement *and test* operation in intrusive_ptr_release
> needs to be atomic. Otherwise you run the risk of
> the "// whatever" code being executed twice in
> different threads.

Shouldn't atomic_count::operator-- return 0 in one and only one
thread? If not, it wouldn't be a very good atomic counter...

Caleb Epstein

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