If a thread is waiting on a co开发者_如何学JAVAnsole.readline is the thread suspended. If not what is it's state?
The thread is not suspended. It's blocked on a method call.
There's not a good way to interact (i.e. wait for user input) with the console on a thread if the user doesn't ever enter information. This question (and my answer) came up with a way to terminate the input thread by having the readline in a separate process altogether.
精彩评论