ts-quiz— ~/loading.ts
tsc --watch● loading…
// tsc --watch · type-checking modules…
await load("loading.ts")
// streaming server components
◇ tsc 6.0.3 · compiling…UTF-8◇ loading…
async def task(n):
await asyncio.sleep(0.01)
return n
async def seq():
a = await task(1)
b = await task(2)
return a + b
async def par():
a, b = await asyncio.gather(task(1), task(2))
return a + b