Re: [Geotools-devel] Why we have two locks

2007-07-06 Thread Martin Desruisseaux
Jody Garnett a écrit : > confirmed - I used Collections.syncrhonizedMap( new HashMap() ) when I > ported your code to Java 1.4 - will that do? Yes I think it should work. Lets just keep whatever "TODO" comment that contains the "J2SE 1.5" keyword (since I plan to perform a search of "J2SE 1.5"

Re: [Geotools-devel] Why we have two locks

2007-07-05 Thread Jody Garnett
Martin Desruisseaux wrote: > I guess that we should put the discussion on a rest for while... The > topic of this post is mostly to insist that your requirements were > understood from the begining (I believe). My feeling is that I failed > to explain why the technical solution - ReadWriteLock -

Re: [Geotools-devel] Why we have two locks

2007-07-05 Thread Martin Desruisseaux
I guess that we should put the discussion on a rest for while... The topic of this post is mostly to insist that your requirements were understood from the begining (I believe). My feeling is that I failed to explain why the technical solution - ReadWriteLock - is an unnecessary overhead for tho

Re: [Geotools-devel] Why we have two locks

2007-07-04 Thread Jody Garnett
Hi Jesse, I do think it all comes down to line 20; and what is being locked ... Regardless we will hook up both implementations, and stress test them - that way we can measure what is better (and if workers end up piling up). I only have access to one dual core machine - so we may end up askin

Re: [Geotools-devel] Why we have two locks

2007-07-04 Thread Jesse Eichar
Pretty picture Jody, I thought that this conversation wasn't crazy enough so I'm throwing my understanding into the mix. ;-) Problem that I see with Martin's solution: Multiple referencing object cannot be created concurrently because line 20 acquires the lock on the table. Any other threa

[Geotools-devel] Why we have two locks

2007-07-04 Thread Jody Garnett
Martin Desruisseaux wrote: > Sigh... One of us is really not understanding the other one point. I > claim again that *the read lock in ObjectCacheEntry is totally > useless* in order to prevent the same CRS to be built twice in two > different threads. Did you understand the workflow I posted tw