Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 741F41012A for ; Wed, 31 Dec 2014 16:30:18 +0000 (UTC) Received: (qmail 13139 invoked by uid 500); 31 Dec 2014 16:30:18 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 13055 invoked by uid 500); 31 Dec 2014 16:30:18 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 12904 invoked by uid 99); 31 Dec 2014 16:30:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Dec 2014 16:30:18 +0000 Date: Wed, 31 Dec 2014 16:30:18 +0000 (UTC) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (POOL-193) It is safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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|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)