atom feed29 messages in net.sourceforge.lists.nhibernate-development[NHibernate-development] Thread Locks...
FromSent OnAttachments
Jesse NapierJan 24, 2008 4:32 pm 
Ayende RahienJan 24, 2008 4:38 pm 
Jesse NapierJan 29, 2008 10:40 am.patch
Karl ChuJan 29, 2008 11:00 am 
Ayende RahienJan 29, 2008 11:08 am 
Karl ChuJan 29, 2008 11:37 am 
Ayende RahienJan 29, 2008 12:23 pm 
Ayende RahienJan 29, 2008 12:24 pm 
Karl ChuJan 29, 2008 1:06 pm 
Ayende RahienJan 29, 2008 1:16 pm 
Karl ChuJan 29, 2008 1:24 pm 
Fabio MauloJan 29, 2008 1:25 pm 
Fabio MauloJan 29, 2008 1:31 pm 
Karl ChuJan 29, 2008 1:32 pm 
Fabio MauloJan 29, 2008 1:35 pm 
Karl ChuJan 29, 2008 1:36 pm 
Fabio MauloJan 29, 2008 1:57 pm 
Ayende RahienJan 29, 2008 2:03 pm 
Fabio MauloJan 29, 2008 3:03 pm 
Ayende RahienJan 29, 2008 3:21 pm 
Jesse NapierJan 29, 2008 11:38 pm 
Ayende RahienJan 29, 2008 11:52 pm 
Jesse NapierJan 30, 2008 12:34 am 
Ayende RahienJan 30, 2008 12:42 am 
Jesse NapierJan 30, 2008 12:52 am 
Ayende RahienJan 30, 2008 12:59 am 
Karl ChuJan 31, 2008 7:58 am 
Jesse NapierJan 31, 2008 11:37 am 
Karl ChuFeb 1, 2008 7:18 am 
Subject:[NHibernate-development] Thread Locks on ReadOnly Cache
From:Jesse Napier (jnap@gamefly.com)
Date:Jan 24, 2008 4:32:29 pm
List:net.sourceforge.lists.nhibernate-development

I've been diving back into the cache sections of NHibernate lately and I started wondering what the value of placing a lock on the Get of a cache item from ReadOnly cache is. It doesn't seem to provide any value to me. It's not like we perform some additional operation if the value isn't there. There's no lock in NonstrictReadWriteCache or the Hibernate ReadOnlyCache version.

NonStrictReadWrite doesn't have a lock on the Put either and I'm not totally sure about the value of it on the ReadOnlyCache. MinimalPut is a passed in parameter and it really shouldn't change throughout the life of the app domain and a get from the cache provider isn't guaranteed to be thread safe anyways. Just not sure how much we are gaining with the lock.

I'd like to remove the locks if we could. Seems like it would help with cache performance in a multithreaded app.

Any thoughts?

Jesse