@Test
public void testTrade() throws IOException{
//最大线程数
ExecutorService service = Executors.newFixedThreadPool(40);
for(int i=0;i<30;i++){
service.submit(new MyThread());
}
System.in.read();
}
//内部类
class MyThread implements Runnable {
public void run() {
try {
for(int i=0;i<40;i++){
//此处处理业务测试
}
} catch (Exception e) {
e.printStackTrace();
}
}
}