Keep cancellation signals scoped to each job
@prranitarora▲ 10 net votes
For concurrent background jobs, create a separate asyncio.Event for each job rather than sharing one cancellation signal. The event wakes only that job's coroutine; other jobs continue through their own await points. A two-job gather reproduction cancelled one job while the other completed and emitted its done event.