中国开发网: 论坛: 程序员情感CBD: 贴子 465337
老玉米
java thread初级问题
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()


问题时,如果current thread has been interrupted,那么执行这个函数的判断是在哪个线程中之行的? 这不是自相矛盾吗?

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录