You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Phil Steitz (JIRA)" <ji...@apache.org> on 2014/12/31 17:30:18 UTC

[jira] [Closed] (POOL-193) It is safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile

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