[ 
https://issues.apache.org/jira/browse/POOL-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710471#action_12710471
 ] 

Mark Thomas commented on POOL-137:
----------------------------------

I can't sync _whenExhaustedAction where it is used or I end up with a deadlock 
when running the tests. I think what I'll do is get a local copy of all the 
fields I need at the start of borrowObject() - in a sync block - so at least we 
are working with a consistent configuration for the rest of that method even if 
it might be out of date.

For the use of Latch, I am happy (at the momentat least ) that the code is 
written in such a way that only one thread will ever be trying to access the 
latch at the same time. If you can see a code path where that isn't the case 
please add it here.

The Config class looks OK to me. Which fields were you worried about?

> Inconsistent synchronization in GenericObjectPool; constant fields should be 
> final
> ----------------------------------------------------------------------------------
>
>                 Key: POOL-137
>                 URL: https://issues.apache.org/jira/browse/POOL-137
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sebb
>
> _whenExhaustedAction is not always accessed using synchronization.
> The private static Latch class appears to be used across threads, but has no 
> synchronization.
> The static class Config contains several fields which appear to be used as 
> constants, however the fields are not final.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to