The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Blocked I/O threads

Posted by Thirumal on October 25, 2000 at 5:59 PM

Hi
I have a thread that reads from URL. I need to exit the thread after certain amount of time no matter whether the read is done or not.
I tried all the ways viz., interrupt() etc..
Since the stop()
method is deprecated I donot know how to stop the thread after the time elapsed...I want to exit via interrupt()..
and close the reader..before exit...
My program sits on the read for more than the time out, if the URL read is going to take more time than the time out.

Please do help me.

Thanks




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us