线程池的拒绝策略不得使用`DiscardPolicy`
Open
- Dominant language
- Kotlin
- Stars
- 30.8k
- Forks
- 8k
- PR merge metrics
- No merged PRs in 30d
Description
## Rule content
线程池的拒绝策略不得使用`DiscardPolicy`。
## Problem description
`DiscardPolicy`不会更新`Future`的任务状态,导致后续调用`Future.get`会无限阻塞。
## Advice
1. 使用`AbortPolicy`
2. Future.get设置超时时间
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the rule implementation that analyzes thread-pool rejection policies, then inspect how its existing tests are organized. Add coverage for DiscardPolicy and verify that the rule recommends AbortPolicy or a timeout for Future.get; done means the prohibited policy is detected as described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100