You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2010/11/23 09:01:18 UTC

[jira] Resolved: (VFS-326) Multi-threading issues

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

Ralph Goers resolved VFS-326.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

DefaultFileMonitor and SoftRefFilesCache were modified to make the boolean variables volatile. In addition, SoftRefFllesCache was modified to use a ConcurrentHashMap and locks instead of synchronization.

> Multi-threading issues
> ----------------------
>
>                 Key: VFS-326
>                 URL: https://issues.apache.org/jira/browse/VFS-326
>             Project: Commons VFS
>          Issue Type: Bug
>            Reporter: Sebb
>            Assignee: Sebb
>             Fix For: 2.0
>
>
> SoftRefFilesCache and DefaultFileMonitor use a boolean to communicate between threads, but don't use synchronisation.
> There is no guarantee that the updated value of the boolean will be seen by the other thread. Adding volatile would fix this.
> There are also various private instance fields that are not modified after construction.
> If these were made final, it would improve thread-safety because the fields would then be published correctly across threads.

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