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

内容错误:12章compareAndDecrementWorkerCount返回值描述 #145

Open
starkZH opened this issue Sep 23, 2024 · 0 comments
Open

内容错误:12章compareAndDecrementWorkerCount返回值描述 #145

starkZH opened this issue Sep 23, 2024 · 0 comments

Comments

@starkZH
Copy link
Contributor

starkZH commented Sep 23, 2024

章节
请描述详细的章节
https://redspider.gitbook.io/concurrent/di-san-pian-jdk-gong-ju-pian/12#id-12.2.4-threadpoolexecutor-ru-he-zuo-dao-xian-cheng-fu-yong-de

相关截图或文字
非核心线程会workQueue.poll(keepAliveTime, TimeUnit.NANOSECONDS) ,如果超时还没有拿到,下一次循环判断compareAndDecrementWorkerCount就会返回null,Worker对象的run()方法循环体的判断为null,任务结束,然后线程被系统回收 。

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

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