Skip to content

Commit

Permalink
Merge pull request Snailclimb#1048 from langghaha/patch-1
Browse files Browse the repository at this point in the history
[拼写错误] java线程池学习总结.md
  • Loading branch information
Snailclimb authored Jan 5, 2021
2 parents 60917bb + 955d34e commit 1c71878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/java/multi-thread/java线程池学习总结.md
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ Wed Nov 13 13:40:43 CST 2019::pool-1-thread-5

**`ScheduledThreadPoolExecutor` 的执行主要分为两大部分:**

1. 当调用 `ScheduledThreadPoolExecutor`**`scheduleAtFixedRate()`** 方法或者**`scheduleWirhFixedDelay()`** 方法时,会向 `ScheduledThreadPoolExecutor`**`DelayQueue`** 添加一个实现了 **`RunnableScheduledFuture`** 接口的 **`ScheduledFutureTask`**
1. 当调用 `ScheduledThreadPoolExecutor`**`scheduleAtFixedRate()`** 方法或者 **`scheduleWithFixedDelay()`** 方法时,会向 `ScheduledThreadPoolExecutor`**`DelayQueue`** 添加一个实现了 **`RunnableScheduledFuture`** 接口的 **`ScheduledFutureTask`**
2. 线程池中的线程从 `DelayQueue` 中获取 `ScheduledFutureTask`,然后执行任务。

**`ScheduledThreadPoolExecutor` 为了实现周期性的执行任务,对 `ThreadPoolExecutor`做了如下修改:**
Expand Down

0 comments on commit 1c71878

Please sign in to comment.