Relative Content

Tag Archive for pythonpython-3.xmultithreadingmultiprocessingpython-multiprocessing

How to init Pool() inside child daemonic, but only once?

On python 3.11 and Ubuntu I have a task to init asynchronous calls every time interval (not asyncio) and inside child do multiprocessing task. I have 36 cores / 72 processors. The problem is when I init new Pool(72) it takes 0.3 seconds that is too much for my task, because performance matters. With this article Python Process Pool non-daemonic? I found out how to do new pool inside pool (using NoDaemonProcess). But how to init child pool only once? concurrent.futures does not good for me, because I made test and it’s slower than multiprocessing.