python
Python Subprocess Concurrency with AsyncIO
Here's a useful function I find myself rewriting quite often when I want to automate some IO-bound task that benefits from async concurrency (not quite true parallelism, since CPU-bound tasks would still ultimately run sequentially with this code). import asyncio import os import time MAX_SUBPROCESSES