hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <adr...@intencha.com>
Subject Re: Deadlock problem with MultiThreadedHttpConnectionManager
Date Thu, 19 Jun 2003 08:41:13 GMT
>> Also, connections release themselves when there is no more data to be 
>> read from the stream.
>> The solution in this case is to always call releaseConnection() when 
>> you're finished with the connection (as is mentioned lots and lots 
>> through our docs :)  and I really can't see any better way to deal 
>> with it.
> This is definitely the right use of the API (the one who acquires a 
> resource is the one to release it; not taking disasters like sudden 
> death into account here). Forgetting releaseConnection is misuse and 
> therefore I don't care if a deadlock occurs in that situation. Are we 
> 100% sure that a deadlock can not occur when releaseConnection is used 
> correctly?

In proper use, we are as certain as is possible that HttpClient won't 
deadlock.  There are of course a number of places where HttpClient can 
be configured to wait indefinitely such as if the server doesn't 
respond etc but all of that is configurable.

Adrian Sutton.

View raw message