Closed xws117 closed 5 years ago
if the data size is more, pool will spawn a process and IPC will be slow defeating the purpose. newer versions of python have shared memory which can get around this issue. thread_pool is faster because it does not start new processes but it only runs on a single core, so its more suitable for io bound operations or some level of parallelism where cpu is not fully utilized
Why use thread_pool in processing image but use multiprocessing.pool in process labels? I tried both use multiprocessing.pool ,that would be slower ,and i don't know whether it is safe...