Boost logo

Boost :

From: Pete Becker (petebecker_at_[hidden])
Date: 2002-05-07 09:19:24


At 09:41 AM 5/7/2002 -0400, Richard Damon wrote:
>Atomic types may be accessed, with atomic operations, safely across multiple
>threads without the need of external interlocks.

For certain restricted meanings of "safely". <g> On a multi-processor
system changes made in one thread often won't be visible to another thread
running on a different processor because the two processors' caches aren't
synchronized by this sort of operation. That's a part of the broader issue
of memory visiblity, and this particular problem is solved by a mutex.
Think of a mutex as an inter-thread sequence point: operations in a thread
that unlocks a mutex are visible to a thread that subsequently locks the
same mutex.

        -- Pete

Dinkumware, Ltd.
"Genuine Software"


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