commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandy McArthur (JIRA)" <>
Subject [jira] Commented: (POOL-91) StackObjectPool.borrowObject infinate loop when makeObject returns null
Date Fri, 15 Dec 2006 16:56:26 GMT
    [ ] 
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:
>             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:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message