commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy McArthur (JIRA)" <j...@apache.org>
Subject [jira] Commented: (POOL-91) StackObjectPool.borrowObject infinate loop when makeObject returns null
Date Fri, 15 Dec 2006 16:56:26 GMT
    [ http://issues.apache.org/jira/browse/POOL-91?page=comments#action_12458847 ] 
            
Sandy McArthur commented on POOL-91:
------------------------------------

I think there is a fundamental difference between a ThreadPoolExecutor and ObjectPool. Mainly
that with a Executor your client code hands it a Runnable to execute and forget about it but
with a Pool your client code keeps interacting with the pool many times. Also the Executor
has it's own Threads and is asynchronous to the client code; you never know when the submitted
Runnable may throw an exception. Pools are synchronous and you know that borrowObject is not
going to fail except for when it's called by your client code. My point is the only way to
be notified or deal with errors for an Executor is via callbacks (or sub-classing) but since
there is direct interaction with the pool, error handling callbacks aren't needed.

> StackObjectPool.borrowObject infinate loop when makeObject returns null
> -----------------------------------------------------------------------
>
>                 Key: POOL-91
>                 URL: http://issues.apache.org/jira/browse/POOL-91
>             Project: Commons Pool
>          Issue Type: Bug
>            Reporter: Sandy McArthur
>         Assigned To: Sandy McArthur
>         Attachments: sample-borrow-fail-pool-policy.tar.bz2
>
>
> StackObjectPool.borrowObject has a infinate loop when makeObject returns null.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message