资 源 简 介
线程池用一个双向链表来表示,池中的元素是处于休眠状态的工作线程。ThreadPool类大部分工作都是来维护这个双向链表,当有新的请求到达时,先从表头摘取一个工作线程,将其唤醒转入工作状态。如果线程池为空,则创建一个新的工作线程。-thread pool with a two-way link list said to a pool element is in a state of dormancy threads. ThreadPool class most of the work to maintain the two-way linked list, when a new request arrives, starting with the first removal of a table working thread will awaken to their work status. If the thread pool is empty, then create a new thread work.