hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: 'cancelling' a request
Date Wed, 03 Aug 2005 09:23:04 GMT
Hi Chris,

Call Thread#interrupt() first and wait for the thread to terminate
cleanly for a grace period of your choice. If the thread fails to
terminate, call HttpMethod#abort() on the respective HTTP method

Hope this helps,

Oleg


On Tue, Aug 02, 2005 at 11:47:07PM -0400, Chris Lewis wrote:
> Hello all,
> 
> I'm working an a project that uses HttpClient (3), and have a question
> regarding threading (I know that I need to use a
> MultiThreadedHttpConnectionManager). My question is this: how can I
> safely terminate a pending request from a different thread? Assuming I
> use a single (or pool of) IO thread, is it enough to just call
> Thread.interrupt() to properly 'shut-down' and effectively cancel the
> request?
> 
> regards,
> Chris Lewis
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message