-
Notifications
You must be signed in to change notification settings - Fork 0
quick python
Roberto Fronteddu edited this page May 18, 2026
·
18 revisions
Run multiple workers
import asyncio
async def worker(name):
while True:
print(f"{name} working")
await asyncio.sleep(1)
async def main():
await asyncio.gather(
worker("A"),
worker("B"),
worker("C"),
)
asyncio.run(main())