Re: [picocontainer-dev] Re: [picocontainer-scm] [3768] java/2.x/trunk/pico/container/src/test/org/picocontainer/behaviors: reentrant lock stuff - alternative to synchronized

Jörg Schaible <[email protected]>
Newsgroups gmane.comp.java.picocontainer.devel
Message-ID <[email protected]>
peter royal wrote:

> On Jul 28, 2007, at 4:59 PM, Paul Hammant wrote:
>> Jörg mentioned it some months back. Suggesting we could switch to
>> it from synchronized.  The IBM article suggests its better for now,
>> but not forever.
>>
>> Rekindling that discussion.
>>
>> Should we roll this into Caching or is it best to have things
>> separate?
> 
> I'm not sure the use-case of having it separate.

Ahh no, not again, thought we were over it ;-)
Look into the archives for the discussion 2 months ago.

> And if it is separate, even less sure of the value of having two
> implementations of the same thing. Sounds like it'll be begging for
> confusion from users.

That's true. We should take the one that's working best. The reentrant
locking will avoid that you pay for synchronization for reading. However, a
small benchmark should reveal it. Have a look at XStream's benchmark
package ... it is not tied to XStream :)

- Jörg

BTW: I've started for XStream to keep such little benchmarks for separate
aspects of the framework. I normally run these tests against the last
release and the head revision - it is quite helpful sometimes.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.