commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon Mohr (JIRA)" <>
Subject [jira] Commented: (POOL-75) [pool] GenericObjectPool not FIFO with respect to borrowing threads
Date Wed, 07 Jun 2006 03:42:30 GMT
    [ ] 

Gordon Mohr commented on POOL-75:

You didn't like my patch? (See bugzilla; it doesn't depend on util.concurrent.) 

Even if the subclass itself isn't to be integrated -- it is a little awkward -- if the GenericObjectPool
class were a bit more friendly to subclassing (fewer private fields) anyone could drop in
the Fair subclass without having to patch GenericObjectPool itself. 

> [pool] GenericObjectPool not FIFO with respect to borrowing threads
> -------------------------------------------------------------------
>          Key: POOL-75
>          URL:
>      Project: Commons Pool
>         Type: Improvement

>     Versions: Nightly Builds
>  Environment: Operating System: All
> Platform: All
>     Reporter: Gordon Mohr
>     Priority: Minor

> GenericObjectPool has recently been made FIFO with respect to the managed pool
> objects -- however, it is still not FIFO with respect to threads requesting
> those objects. Specifically, because standard non-fair Java synchronization
> monitors are used, later threads may barge ahead of earlier threads that are
> already waiting for a pool object to become available. At its extreme, some
> threads can cycle objects through the pool many times while others wait
> interminable. 
> Not every application needs FIFO fairness with respect to threads, and such
> fairness implies an overhead, so it  need not be the default behavior, but it
> would be a valuable option where many threads are sharing a smaller number of
> pool objects. 
> I can submit a FairGenericObjectPool which achieves thread-fairness; it only
> requires small changes to GenericObjectPool which allow some subclass overriding.

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