Skip to content

Commit

Permalink
Update java-concurrent-questions-03.md
Browse files Browse the repository at this point in the history
  • Loading branch information
WindLYLY authored Aug 15, 2024
1 parent 641f4fa commit cb70cdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/concurrent/java-concurrent-questions-03.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public ScheduledThreadPoolExecutor(int corePoolSize) {

`ThreadPoolExecutor`其他常见参数 :

- `keepAliveTime`:线程池中的线程数量大于 `corePoolSize` 的时候,如果这时没有新的任务提交,核心线程外的线程不会立即销毁,而是会等待,直到等待的时间超过了 `keepAliveTime`才会被回收销毁。
- `keepAliveTime`:当线程池中的线程数量大于 `corePoolSize` 的时候,即有非核心线程,这些非核心线程空闲时不会立即销毁,而是会等待,直到等待的时间超过了 `keepAliveTime`才会被回收销毁。
- `unit` : `keepAliveTime` 参数的时间单位。
- `threadFactory` :executor 创建新线程的时候会用到。
- `handler` :拒绝策略(后面会单独详细介绍一下)。
Expand Down

0 comments on commit cb70cdf

Please sign in to comment.