commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-191) Possible improvements using static analysis.
Date Thu, 22 Jan 2009 14:07:59 GMT

    [ https://issues.apache.org/jira/browse/IO-191?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12666146#action_12666146
] 

Sebb commented on IO-191:
-------------------------

@Jukka (was @Sebb)

The problem is - what does A: see for the collection the *next* time it accesses it?

Unless the collection field is volatile, there is no guarantee that A will see the updated
value for the field.
And unless the A and B synch. on the same lock, A can see a partially updated object.

AIUI the example works because thread A owns the iterator across the change made by B.
When A needs to fetch the iterator again, it won't necessarily see the new collection unless
synch. is used.

> Possible improvements using static analysis.
> --------------------------------------------
>
>                 Key: IO-191
>                 URL: https://issues.apache.org/jira/browse/IO-191
>             Project: Commons IO
>          Issue Type: Improvement
>            Reporter: Peter Lawrey
>            Priority: Trivial
>         Attachments: commons-io-static-analysis.patch
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>


-- 
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