commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-757) ResizableDoubleArray is not thread-safe yet has some synch. methods
Date Fri, 19 Jul 2013 11:28:49 GMT

    [ https://issues.apache.org/jira/browse/MATH-757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713564#comment-13713564
] 

Gilles commented on MATH-757:
-----------------------------

We could implement a clean, basic functionality i.e.
* dropping all "synchronized" keywords,
* removing everything marked as deprecated,
* only implementing a minimal API (perhaps similar to [Deque<Double>|http://docs.oracle.com/javase/6/docs/api/java/util/Deque.html]),
with transparent resizing.

from which "ResizableDoubleArray" could inherit.
                
> ResizableDoubleArray is not thread-safe yet has some synch. methods
> -------------------------------------------------------------------
>
>                 Key: MATH-757
>                 URL: https://issues.apache.org/jira/browse/MATH-757
>             Project: Commons Math
>          Issue Type: Bug
>            Reporter: Sebb
>             Fix For: 4.0
>
>
> ResizableDoubleArray has several synchronised methods, but is not thread-safe, because
class variables are not always accessed using the lock.
> Is the class supposed to be thread-safe?
> If so, all accesses (read and write) need to be synch.
> If not, the synch. qualifiers could be dropped.
> In any case, the protected fields need to be made private.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message