On Sat, Mar 8, 2014 at 2:33 PM, Furkan KAMACI <furkankam...@gmail.com> wrote:
> ConcurrentLRUCache<K,V>  class has that lines:
>
> ...
> long oldestEntry = this.oldestEntry;
> isCleaning = true;
> this.oldestEntry = oldestEntry;     // volatile write to make isCleaning
> visible
> ...
>
> What does that assignment and so makes isCleaning visible?

It's called piggy-backing...
All changes before a volatile write will be visible to another thread
after reading that volatile variable.

-Yonik
http://heliosearch.org - native off-heap filters and fieldcache for solr

Reply via email to