
1 Aug
2006
1 Aug
'06
9:07 p.m.
On 8/1/06, Dave Compton <abcdave@fastmail.fm> 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