Skip to content

Commit

Permalink
[拼写错误] java线程池学习总结.md
Browse files Browse the repository at this point in the history
拼写错误修正:`scheduleWirhFixedDelay()` -> `scheduleWithFixedDelay()`
  • Loading branch information
langghaha authored Jan 5, 2021
1 parent 7b3bf36 commit 955d34e
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 955d34e

Please sign in to comment.