Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2003-01-22 10:58:53


"Philippe A. Bouchard" wrote:
[...]
> Now, it's been a while I did not worked on any locking mechanism but if I am
> accessing one counter and the increment instruction is atomic, why would I
> need to lock anything?

You'll need the locking protocol/>>memory synchronization<< to
ensure visibility of mutations [unless the managed object happens
to be immutable] for its proper ``cleanup.'' The main problem is
that the count's decrements should not "overtake" memory
transaction(s) resulted from object updates/mutation.

http://groups.google.com/groups?selm=3DDD0AD2.6760E7F9%40web.de
(Subject: Re: std::string, reference counting...)

http://groups.google.com/groups?selm=3DEDDFD7.25D14860%40web.de
(Subject: Re: Portable Memory Barriers...)

regards,
alexander.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk