This topic has
1
reply
on
1
page.
i'm using jdk 1.4.2_03-b02
thread 'reader' is reading input with BufferedReader.readLine(); now another thread wants to stop the 'reader' thread.
javadoc of Thread says that the best approach is to set a boolean and call Thread.interrupt() but no luck. BufferedReader.readLine() keeps waiting.
i tried various alternatives, but no luck. found on some other forum that it is impossible to interrupt this call. i can't believe that :-)
any pointers are appreciated.
regards, tom.
You need to modify your design, if you start reading and there's nothing to read, it will block until new data is available. You can get around this possibly with the NIO api.
What are you trying to do anyway? Where does the data come from?
This topic has
1
reply
on
1
page.
Back to Forum
Read the Developer Forums Code of Conduct
Email this Topic
Edit this Topic
Site Upgrade
Forums 7.1.8 was deployed Oct 26th. The release consists of minor fixes & a few enhancements.
Forums Statistics
Users Online : 28 Guests : 129
About Sun forums
Oracle Forums is a large collection of user generated
discussions. It is here to help you ask questions, find answers, and
participate in discussions.
Check out our guide on Getting
started with Oracle Forums for a full walkthrough of how to best
leverage the benefits of this community.