-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThreadPoolTest.java
More file actions
20 lines (18 loc) · 671 Bytes
/
Copy pathThreadPoolTest.java
File metadata and controls
20 lines (18 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/**
* @(#)ThreadPool.java
*
* @author Black
*
* @version 1.00 2014/8/11
*/
public class ThreadPoolTest {
public static void main(String[] args) {
ThreadPool pool=ThreadPool.createThreadPool(6);
pool.execute(new Runnable[]{new SimpleThread(),new SimpleThread(),new SimpleThread()});
pool.execute(new Runnable[]{new SimpleThread(),new SimpleThread(),new SimpleThread()});
pool.execute(new Runnable[]{new SimpleThread(),new SimpleThread(),new SimpleThread()});
System.out.println("-----------------------\n"+pool+"\n-----------------------");
pool.destroy();
System.out.println("-----------------------\n"+pool+"\n-----------------------");
}
}