От: | Sharov | ||
Дата: | 09.04.15 09:06 | ||
Оценка: |
In this example, LazyGet is always guaranteed to return “42.” However, if the _box field were not volatile, LazyGet would be allowed to return “0” for two reasons: the reads could get reordered, or the writes could get reordered.