How aiomultiprocess works: AsyncIO and Multiprocessing together
mainThe core concept of aiomultiprocess is to combine the benefits of asyncio and multiprocessing.
- AsyncIO alone is limited by the Global Interpreter Lock (GIL).
- Multiprocessing alone typically works on one task at a time per process.
aiomultiprocess runs a full AsyncIO event loop on each child process. This allows each child process to execute multiple coroutines at once, enabling high levels of concurrency that scale with the number of available CPU cores.