Skip to content

Instantly share code, notes, and snippets.

@johnssuh
johnssuh / What does asyncio.sleep(0) Do?
Created July 4, 2018 09:24
Some cool stuff with asyncio
import asyncio
class DummyAPI:
async def get(self, number):
print(f"GET {number} executed")
await asyncio.sleep(number)
return number, "a"
async def context_switched_get(self):
dispatch_list = []