1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-25 02:27:10 +08:00

Update java-concurrent-questions-03.md

This commit is contained in:
Raxcl 2022-08-03 22:01:30 +08:00 committed by GitHub
parent c58d5c3547
commit 9752436602
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,7 +249,7 @@ public class ThreadPoolExecutorDemo {
new ThreadPoolExecutor.CallerRunsPolicy()); new ThreadPoolExecutor.CallerRunsPolicy());
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
//创建WorkerThread对象WorkerThread类实现了Runnable 接口) //创建 MyRunnable 对象MyRunnable 类实现了Runnable 接口)
Runnable worker = new MyRunnable("" + i); Runnable worker = new MyRunnable("" + i);
//执行Runnable //执行Runnable
executor.execute(worker); executor.execute(worker);