标签: python multithreading threadpool
当我通过确定线程数创建ThreadPool时,我需要知道该数字是否是已创建并一起运行的有效线程数,或者这仅仅是限制,而有效线程数实际上是由提供的数据长度。
pool = ThreadPool(128) # does 128 threads are created after this line? data = [1, 2, 3] result = pool.map(func, data) pool.close() pool.join()