tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [PATCH] jdbc-pool | FairBlockingQueue
Date Fri, 24 May 2013 21:10:45 GMT

On 5/24/13 4:08 PM, Björn Raupach wrote:
> out of pure curiosity I was browsing the source of jdbc-pool and
> ended up looking through FairBlockingQueue. FairBlockingQueue
> utilises a global ReentrantLock for mutual exclusion. Common practice
> is to always follow a call to lock with a try-finally block. The
> methods poll(long, TimeUnit), pollAsync() don't use that practice. I
> was wondering why. Attached is modified version of FairBlockingQueue.
> I know FairBlockingQueue is a sensitive part of jdbc-pool and I am
> certainly not trying to smart ass. Its just interest and probably
> only a minor issue.

Your attachment has been stripped from the list. It's best to attach
patches to Bugzilla entries, but I'd wait and see if anyone objects to
the idea before filing the bug.

If you can write a test that demonstrates a bug, that would be even
better... "bug fixes" that come from pure code-reviews tend to be viewed
skeptically around here, though this one seems to theoretically lead to

If it can theoretically lead to deadlock, can you force a situation
where it *actually* leads to deadlock (or some other unfortunate condition)?


View raw message