summaryrefslogtreecommitdiff
path: root/tests/simult.py
blob: 49d3e4b95b22577ed763bf4622c39832426a7b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import asyncio


async def count():
    print("before")
    await asyncio.sleep(3)
    print("after")


async def main():
    await asyncio.gather(count(), count(), count())
    i = 0
    while i < 3000000:
        i += 1
    print("done")

asyncio.run(main())