关于Thread.currentThread()的问题 书上(Java核心技术,卷一,英文版,P728)举了个例子,说,要查看一个线程的“打断状态”是否被设置,首先调用Thread.currentThread(),再调用isInterrupted(),例如:while (!Thread.currentThread().isInterrupted() && more work to do) { do more work } 一个线程可以对打断进行处理决定是否终止,但大多数的线程对于打断的处理应该是终止,这样的线程的run()方法应该如此: public void run() { try { . . . while (!Thread.currentThread().isInterrupted() && more work to do) { do more work } } catch(InterruptedException e) { // thread was interrupted during sleep or wait } finally { cleanup, if required } // exiting the run method terminates the thread } 我想问,为什么要调用Thread.currentThread()啊,直接调用isInterrupted()不行吗?因为 while (!Thread.currentThread().isInterrupted() && more work to do)这句不是在run方法里吗,获取了currentThread不也是"this"吗?