volatile useage in pico ?

View: New views
2 Messages — Rating Filter:   Alert me  

volatile useage in pico ?

by Paul Hammant-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://www.ibm.com/developerworks/java/library/j-hashmap.html

It's lower cost that full synchronization around set access (etc).  
Perhaps for DPC's lists/sets/maps of components-adapters.

Thoughts?

Regards,

- Paul


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

    http://xircles.codehaus.org/manage_email



RE: volatile useage in pico ?

by Jörg Schaible :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Paul,

Paul Hammant wrote:
> http://www.ibm.com/developerworks/java/library/j-hashmap.html
>
> It's lower cost that full synchronization around set access (etc).
> Perhaps for DPC's lists/sets/maps of components-adapters.
>
> Thoughts?

Interesting article. However, did you already look at the code how we use those collections internally? The problem I see (and that's imlicitly addressed in the article) is, when we iterate over the items. You will (especially for maps) always iterate over the "old" items of the collection. We will have a very close look about our usage. An alternative might be the usage of the concurrent collection of JDK 5 though.

- Jörg

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

    http://xircles.codehaus.org/manage_email