Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-06-08 13:57:46


At 10:02 AM 6/8/00 -0500, Bill Wade wrote:
>
>> Can we assume a compiler (which may be multi-platform, like
>> Metrowerks or egcs) treats operating system function calls like
>> "library I/O functions"? That seems risky. Volatile seems a
safer
>> way to force sequence, at least based on that one sentence in the
>> standard.
>
>Volatile is safer, but it can be very inconvenient. Suppose I want
to
>synchronize access to some particular std::vector (say look at its
size()).
>
>If I make the vector volatile I can't use it for much of anything,
since
>vector has no volatile members.

I was thinking of volatile in the context of multithreading
internals, not in terms of anything a user would write.

--Beman


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