DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39590>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=39590

           Summary: [pool] GenericObjectPool not FIFO with respect to
                    borrowing threads
           Product: Commons
           Version: 1.3 Final
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Pool
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


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.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to