interrupted public static boolean interrupted()Tests whether the current thread has been interrupted. The interrupted status of the thread is cleared by this method. In other words, if this method were to be called twice in succession, the second call would return false (unless the current thread were interrupted again, after the first call had cleared its interrupted status and before the second call had examined it). Returns: true if the current thread has been interrupted; false otherwise. See Also: isInterrupted()
我很想看懂你说的invoke的问题,可还是没看懂,关键是几个主语你没说清楚,不知你指的线程、事件具体是什么含义,另外,点击一个按钮确实能够中止另一个,不然,两个线程不就同时修改组合框的东西了吗,我跟踪了一下,确实是中断了。
这句就不可能输出,但结果是输出了。
public static boolean interrupted()Tests whether the current thread has been interrupted. The interrupted status of the thread is cleared by this method. In other words, if this method were to be called twice in succession, the second call would return false (unless the current thread were interrupted again, after the first call had cleared its interrupted status and before the second call had examined it).
Returns:
true if the current thread has been interrupted; false otherwise.
See Also:
isInterrupted()