hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Hexsel <ghex...@sagebrushcorp.com>
Subject RE: How to set timeout parameters for a method?
Date Tue, 14 Dec 2004 16:53:49 GMT
  How would I do that?  I can't use Thread.stop() for a variety of reasons,
and I don't know any other way of stopping in the middle of a blocking

  []s Gustavo

PS.: reasons not to use thread.stop:
1 - might cause deadlocks or race conditions (multithreaded, locking to
prevent script modification while connectors are used)
2 - cleanup code might not get executed (finally blocks, returning
connections to the pool)
3 - I'm using Doug Lea's thread pooling library, not sure if that would kill
the thread reuse mechanism

-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com]
Sent: December 14, 2004 12:45 AM
To: HttpClient User Discussion
Subject: RE: How to set timeout parameters for a method?

Hello Gustavo,

why don't you start a timout process at the beginning which
then aborts the method after the general timeout has expired?
No need to worry where the method execution is just then.


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

View raw message