Skip to content

Commit

Permalink
vault backup: 2025-01-09 17:36:24
Browse files Browse the repository at this point in the history
Affected files:
docs/03编程语言/Java/03Java并发/(问题)不同线程状态下对于中断请求的反应?.md
  • Loading branch information
givedrug committed Jan 9, 2025
1 parent 16959bc commit 347efde
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

NEW 和 TERMINATED 对于中断操作几乎是屏蔽的;

RUNNABLE 和 BLOCKED 类似,对于中断操作只是设置中断标志位并没有强制终止线程,对于线程的终止权利依然在程序手中;

WAITING / TIMED_WAITING 状态下的线程对于中断操作是敏感的,他们会抛出异常并清空中断标志位。

参考:[Java并发之线程中断](https://blog.csdn.net/qq_35326718/article/details/78137108)

0 comments on commit 347efde

Please sign in to comment.