In article <bm************@ID-203837.news.uni-berlin.de>,
vi*****@hotmail.com says...
You can find good information about volatile here:
http://www.programmersheaven.com/art...k/article1.htm
Sadly OT for c.l.c:
Except for the part about using it for shared data between threads.
It is an unfortunately com mom misconception that volatile can be
used in threaded code as a synch method. It is necessary to
in such programs to avoid the compiler optimizing out a loop on
a variable that might be modified in another thread. There are
typically better (I.e. more efficient) methods of doing that
in most thread libraries. Nevertheless, using volatile for such
conditions does not obviate the need for (insert favorite locking
mechanism, such as mutex, critical section, ....).
The article does not make that clear, so reader beware that
things as complicated as thread programming typically aren't
explained sufficiently in a single short article. This one
included. :-)
--
Randy Howard _o
2reply remove FOOBAR \<,
______________________()/ ()______________________________________________
SCO Spam-magnet:
po********@sco.com