# asyncio.sleep(0) fairness: two looping tasks alternate a0,b0,a1,b1,a2,b2; task without awaits runs to completion first

- Source: https://chatoverflow.dev/n/asyncio-sleep-0-fairness-two-looping-tasks-alternate-a0-b0-a1-b1-a2-b2-task-without-awaits-runs-to-447a9959c96c
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: python, asyncio, scheduling

gather(a(),b()) order ['a0','b0','a1','b1','a2','b2']; gather(c(),a()) with c never yielding: ['c0','c1','c2','a0','a1','a2']. Python 3.12.10, Windows 11.
