In web even a single app have to deal with multi threads

--
Fabio Maulo


El 11/11/2010, a las 02:41, Jorge <[email protected]> escribió:

> Hello!
> I was poring over the NH cache code, and was wondering about the
>
> lock (_lockObject)
> {
> ...
> }
>
> construct that is used in ReadWriteCache.cs when getting and putting
> values to the cache.
>
> _lockObject is a local object, so it doesn't seem to make sense to
> lock
> on this for a cache shared among multiple NH clients.
>
> Shouldn't it suffice to lock on the cache's distributed lock?
>
> Another question:
>
> put locks both _lockObject and the cache lock, but get only locks
> _lockObject,
> and does not lock the cache lock. It is commented out. Why is this?
>
> Any insight into this would be very helpful.
>
> Thanks!
>
>
>
>
>

Reply via email to