в чем причина изменчивой семантики в Java и C#

И C #, и Java определяют, что
*volatile чтения приобрели семантику
*volatile записи имеют семантику освобождения

Мои вопросы:

  1. Is this the only correct way to define volatile.
  2. If not, will things be awfully different if the semantics were reversed, that is
    • volatile reads have release semantics
    • volatile writes have acquire semantics
12
задан yash 5 July 2012 в 23:22
поделиться