[
https://issues.apache.org/jira/browse/POOL-193?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Thomas resolved POOL-193.
------------------------------
Resolution: Fixed
Fix Version/s: 2.0
I made the method synchronized to align it with GKOP.
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira