CPU密集型(CPU-bound) 线程数一般设置为: 线程数 = CPU核数+1 (现代CPU支持超线程) IO密集型(I/O bound) 线程数一般设置为: 线程数 = ((线程等待时间+线程CPU时间)/线程CPU时间 )* CPU数目