What wrote:
... Другой пример — паттерн double-checked locking, при реализации которого, кстати, может понадобиться volatile.
[q]
http://groups-beta.google.com/group/comp.lang.c++.moderated/browse_frm/thread/811a3ae4eea2d481/
The problem exists, because the C++ standard allows reordering of C++ statements,
as long as the observable behaviour stays the same — with the bad side
effect that the "observable behavior" in C++ is not multi-threading
aware and this finally leads to
Scott's conclusion: "There is no
portable way to implement DCLP in C++".
[/c]
--
Maxim YegorushkinPosted via RSDN NNTP Server 1.9