harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Gan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6377) A patch to make WeakHashMap more parallel-friendly
Date Wed, 18 Nov 2009 03:04:39 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

James Gan updated HARMONY-6377:
-------------------------------

    Attachment: whm.patch

While WeakHashMap is used in a parallel application, it's important to ensure its get() method
can be called without synchronized decoration. What we did in this patch:

1. In all write method, adjust position of existing write to volatile variable modCount so
it happens after modifications to WeakHashMap
2. In get() method, put volatile read to modCount in the beginning of method body, so that
get() method can see modification to WeakHashMap.



> A patch to make WeakHashMap more parallel-friendly
> --------------------------------------------------
>
>                 Key: HARMONY-6377
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6377
>             Project: Harmony
>          Issue Type: Improvement
>          Components: Classlib
>         Environment: Any modern multi-core environment
>            Reporter: James Gan
>            Assignee: Tim Ellison
>         Attachments: whm.patch
>
>
> In Harmony, the original ReferenceQueue is a lock-base queue, which doesn't scale well
on multi-core environment. Here I attached an lock-free version of ReferenceQueue based on
Amino Library, which has better scalability than original queue

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message