Boost logo

Boost :

From: Russell Hind (rhind_at_[hidden])
Date: 2004-07-08 03:36:53

Dan wrote:
> Also one does not need to use a spin lock on a ref counted implementation. A
> much faster (and safer) way to do that is just using InterlockedIncrement
> and InterlockedDecrement when changing the ref count. I beleive this is what
> most popular ref counting implementations use.

If you're referring to the ref-counted shared_ptr, then it has two
counts it needs to keep track of, strong_count and weak_count, so
InterlockedXXXXXX can't be used. Therefore the 'spin-lock' was
introduced IIUC.



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