commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37321] New: - GenericObjectPool.Evictor._cancelled should to be declared as volatile
Date Tue, 01 Nov 2005 15:28:24 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37321>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37321

           Summary: GenericObjectPool.Evictor._cancelled should to be
                    declared as volatile
           Product: Commons
           Version: unspecified
          Platform: All
               URL: http://java.sun.com/docs/books/jls/third_edition/html/cl
                    asses.html#8.3.1.4
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P4
         Component: Pool
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: Sandy@McArthur.org


In GenericObjectPool line 1121 the field _cancelled should to be declared as volatile. 

My understanding of the JLS is that Threads are allowed to make a local copy of shared variables
and since 
_cancled is used by a  a Thread to control termination of the run() method and appears to
only ever be 
updated by other threads calling the cancle() method which means the update to _cancled may
go 
unnoticed for a good long while.

That said, every JVM I've used was implemented in a way that would detect a change to _cancled
in a 
reasonable amount of time but that behavior shouldn't be depended on.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message