不允许在方法内部创建线程池
Open
- Dominant language
- Kotlin
- Stars
- 30.8k
- Forks
- 8k
- PR merge metrics
- No merged PRs in 30d
Description
## Rule content
.【强制】线程资源必须通过线程池提供,不允许在应用中自行显式创建线程,不允许在方法内部创建线程池。
## Problem description
在方法内部创建线程池等同于在应用中自行创建线程,在并发情况下,有可能造成系统创建大量同类线程面导致消耗内存或者“过度切换”的问题,也容易出现线程池不正确shutdown。
## Advice
Contributor guide
No contributing guide indexed for this repository
Research direction
The issue names no source file, test, or entry point. Start by locating the rule that checks thread creation and its existing tests, then verify how method-local thread-pool creation is represented. Done means the prohibited pattern is detected without permitting application-managed thread pools outside methods, with regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100