mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
Merge pull request #1782 from Raxcl/patch-4
Update java-concurrent-questions-03.md
This commit is contained in:
commit
7628b6178d
@ -250,7 +250,7 @@ public class ThreadPoolExecutorDemo {
|
||||
new ThreadPoolExecutor.CallerRunsPolicy());
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
//创建WorkerThread对象(WorkerThread类实现了Runnable 接口)
|
||||
//创建 MyRunnable 对象(MyRunnable 类实现了Runnable 接口)
|
||||
Runnable worker = new MyRunnable("" + i);
|
||||
//执行Runnable
|
||||
executor.execute(worker);
|
||||
|
Loading…
x
Reference in New Issue
Block a user