Thread.interrupt()应该是您要寻找的方法。确保您的输入访问方法也检查InterruptedException和ClosedByInterruptException。
另请参阅Sun Concurrency
Tutorial中的相应页面,作为另一种解决方案的建议。

Thread.interrupt()应该是您要寻找的方法。确保您的输入访问方法也检查InterruptedException和ClosedByInterruptException。
另请参阅Sun Concurrency
Tutorial中的相应页面,作为另一种解决方案的建议。