http://ifeve.com/easy-happens-before/
重点:
An unlock on a monitor happens-before every subsequent lock on that monitor.
A write to a volatile field happens-before every subsequent read of that volatile.
然后看文章后面的举例。
http://ifeve.com/easy-happens-before/
重点:
An unlock on a monitor happens-before every subsequent lock on that monitor.
A write to a volatile field happens-before every subsequent read of that volatile.
然后看文章后面的举例。