Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interrupted方法描述有误 #3

Open
Luolanjiao opened this issue May 6, 2019 · 1 comment
Open

interrupted方法描述有误 #3

Luolanjiao opened this issue May 6, 2019 · 1 comment

Comments

@Luolanjiao
Copy link

image
你好,这句话有误了,根据interrupted方法的注释,应该是:如果连续两次调用interrupted(),第一次如果是true,第二次一定是false.因为此方法只会清除被中断的状态,而不会主动设置中断状态。

  • 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).
@Luolanjiao
Copy link
Author

不过还是非常感谢提供的资源,教程非常详细,很受用,^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant