多线程python包的ThreadPool数据结构创建多少个线程?

时间:2019-05-26 13:31:18

标签: 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()

0 个答案:

没有答案
相关问题