进阶day06-线程池:处理runnable任务
This commit is contained in:
13
javaSE-day06/src/com/inmind/thread_pool10/MyRunnable.java
Normal file
13
javaSE-day06/src/com/inmind/thread_pool10/MyRunnable.java
Normal file
@@ -0,0 +1,13 @@
|
||||
package com.inmind.thread_pool10;
|
||||
|
||||
public class MyRunnable implements Runnable{
|
||||
@Override
|
||||
public void run() {
|
||||
System.out.println(Thread.currentThread().getName()+"执行了任务");
|
||||
try {
|
||||
Thread.sleep(100000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user