This content has been marked as final.
Show 5 replies
-
1. Re: Double-checked locking idiom in Node.java
anil.saldhana Apr 26, 2006 11:50 AM (in response to genman)Synchronizing on the method seems right. Isn;t that what is done with the classic singleton?
-
2. Re: Double-checked locking idiom in Node.java
genman Apr 27, 2006 11:09 AM (in response to genman)
I'd like to fix this for the next release, any objections? -
3. Re: Double-checked locking idiom in Node.java
manik Apr 27, 2006 9:01 PM (in response to genman)I'm ok with this
-
4. Re: Double-checked locking idiom in Node.java
ben.wang Apr 28, 2006 12:35 AM (in response to genman)I am ok but curious about the performance impact.
In addition, if you trace the usage, it is used eventuall in createNode() of which seems to be called from CacheLoaderInterceptor and CreateIfNotExistsInterceptor.
But for CreateIfNoteExistsInterceptor, we have "synchronized(this)" block there already, so that kind of makes this moot. However, in CacheLoaderInterceptor, there is no such sync block. So maybe we want to clean it up and think of the semantics in both places. -
5. Re: Double-checked locking idiom in Node.java
belaban Apr 28, 2006 2:33 AM (in response to genman)We don't use the CreateIfNotExistsInterceptor anymore, maybe this class should be removed...