commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (POOL-193) It is safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile
Date Wed, 31 Dec 2014 16:30:18 GMT

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

Phil Steitz closed POOL-193.
----------------------------

> It is safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile
> ------------------------------------------------------------------------------------
>
>                 Key: POOL-193
>                 URL: https://issues.apache.org/jira/browse/POOL-193
>             Project: Commons Pool
>          Issue Type: Bug
>    Affects Versions: Nightly Builds
>         Environment: Platform: All
>            Reporter: Samira Tasharofi
>              Labels: concurrency
>             Fix For: 2.0
>
>
> A field of [org.apache.commons.pool2.impl.GenericObjectPool<T>|http://svn.apache.org/repos/asf/!svn/bc/1206499/commons/proper/pool/trunk/src/java/org/apache/commons/pool2/impl/GenericObjectPool.java]
might need to be synchronized. Field {{org.apache.commons.pool2.impl.GenericObjectPool.evictor}}
is read and written in method {{org.apache.commons.pool2.impl.GenericObjectPool.startEvictor(long)}},
which might be called by multiple threads concurrently. Is there a possibility that {{org.apache.commons.pool2.impl.GenericObjectPool.startEvictor(long)}}
gets invoked concurrently? Would it be safer to make {{org.apache.commons.pool2.impl.GenericObjectPool.evictor}}
{{volatile}}?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message