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

Sebb commented on POOL-140:
---------------------------

1) Do classes need to expose mutable fields, or could the fields be made 
private?
 A sub-class can easily break thread-safety by incorrectly referencing a 
mutable field, even just reading it.

2) Do the Pool classes really need setFactory() methods? Does it make sense to 
create a pool, use it, and then change the factory?
Would it not be better to insist that the factory is specified when creating 
the pool?
This would allow the factory to be made final, improving thread-safety.
There would be no need to check for a null factory.

> Rethink synchronisation strategy
> --------------------------------
>
>                 Key: POOL-140
>                 URL: https://issues.apache.org/jira/browse/POOL-140
>             Project: Commons Pool
>          Issue Type: Task
>            Reporter: Sebb
>             Fix For: 2.0
>
>
> Holding place for items related to synch. that need to be addressed.

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