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

4.3.4 线程中断 建议修改 #139

Open
whatoeat2night opened this issue Apr 8, 2023 · 0 comments
Open

4.3.4 线程中断 建议修改 #139

whatoeat2night opened this issue Apr 8, 2023 · 0 comments

Comments

@whatoeat2night
Copy link

章节
请描述详细的章节
Screenshot 2023-04-08 at 11 09 31

相关截图或文字
请描述相关的截图或文字
Screenshot 2023-04-08 at 11 08 54

修正意见
请描述修正意见,如果可以,请直接提PR,谢谢~

通过 Thread 静态方法interrupted() 来获取当前线程是否被中断,这个方法会在使用的时候清除中断标志位,
通过thread实例调用 isInterrupted 并不会 清除中断标志位,
建议附上源代码,书中连续两次调用 这样的说法会让人感觉非常疑惑

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