★★Java質問・相談スレッド133★★
■ このスレッドは過去ログ倉庫に格納されています
0664デフォルトの名無しさん
2009/11/09(月) 02:46:10えーと・・・・・・ここかな
http://java.sun.com/docs/books/jls/third_edition/html/memory.html#17.4.4
抜粋で
> Synchronization actions induce the synchronized-with relation on actions, defined as follows:
> ・A write to a volatile variable (§8.3.1.4) v synchronizes-with all subsequent reads of v
> by any thread (where subsequent is defined according to the synchronization order).
> If we have two actions x and y, we write hb(x, y) to indicate that x happens-before y.
> ・If x and y are actions of the same thread and x comes before y in program order, then hb(x, y).
> ・If an action x synchronizes-with a following action y, then we also have hb(x, y).
あるスレッド内でvolatileへの書き込みより前に起きることは、
別のスレッド内でそれを読み出した後に起きることよりも前に起きる
■ このスレッドは過去ログ倉庫に格納されています