1 6 7 package org.jfox.pool.thread; 8 9 12 13 public class Test { 14 15 public static void main(String [] args) { 16 ThreadPool tp = new SimpleThreadPool(); 17 for(int c = 1; c < 100; c++) { 18 tp.execute(new TestClass(c + "")); 19 } 20 } 21 } 22 23 class TestClass implements Threadable { 24 private String name; 25 26 public TestClass(String name) { 27 this.name = name; 28 } 29 30 public void run() { 31 System.out.println("TestClass: " + name); 32 } 33 } | Popular Tags |