Re: volatile write to make isCleaning visible at ConcurrentLRUCache

2014-03-08 Thread Yonik Seeley
On Sat, Mar 8, 2014 at 3:28 PM, Shawn Heisey wrote: > Do we have any idea whether this side effect of volatile access is part > of the Java specification Yep, it's part of the JMM (Java Memory Model) and is guaranteed behavior. -Yonik http://heliosearch.org - native off-heap filters and fieldcac

Re: volatile write to make isCleaning visible at ConcurrentLRUCache

2014-03-08 Thread Shawn Heisey
On 3/8/2014 12:50 PM, Yonik Seeley wrote: > On Sat, Mar 8, 2014 at 2:33 PM, Furkan KAMACI wrote: >> ConcurrentLRUCache class has that lines: >> >> ... >> long oldestEntry = this.oldestEntry; >> isCleaning = true; >> this.oldestEntry = oldestEntry; // volatile write to make isCleaning >> visib

Re: volatile write to make isCleaning visible at ConcurrentLRUCache

2014-03-08 Thread Yonik Seeley
On Sat, Mar 8, 2014 at 2:33 PM, Furkan KAMACI wrote: > ConcurrentLRUCache 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

volatile write to make isCleaning visible at ConcurrentLRUCache

2014-03-08 Thread Furkan KAMACI
Hi; ConcurrentLRUCache 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? Thanks; Furkan KAMACI