资 源 简 介
线程的创建、销毁和调度本身是有代价的,如果一个线程的任务相对简单,那这些时间和空间开销就不容忽视了,此时用线程池就是更好的选择,即创建一些线程然后反复利用它们,而不是在完成单个任务后就结束。-thread creation, destruction and scheduling itself is a cost, if the threads of a relatively simple task. That time and space costs can not be ignored, this time using thread pool is the better choice, namely, the creation of some thread then reuse them, rather than individual tasks completed after the end.