hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: Deadlock problem with MultiThreadedHttpConnectionManager
Date Wed, 18 Jun 2003 15:21:39 GMT
It's not clear to me how this can be a dead lock.

Eric Johnson wrote:
> MultiThreadedHttpConnectionManager.doGetConnection() - line 302, which 
> reads "connectionPool.wait(timeToWait)",

This is a limited wait. Not infinite. Oleg, do we ensure that 
timeToWait>0 somehow?

> and the other thread at
> 
> MultiThreadedHttpConnectionManager.ReferenceQueuedThread.run(), line 
> 665, which reads "Reference ref = referenceQueue.remove();".

Both lines of code are in a block synchronized on the same object 
(connectionPool). So how can happen what you observe? Two different 
threads both in a synchronized block on the same object?


Mime
View raw message