summaryrefslogtreecommitdiff
path: root/t/eager_and_scheduled.py
blob: 178a9f47d0d44e9c553694516c9f8e50fa07c2fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import asyncio


async def foo():
    await asyncio.sleep(1.0)
    await baz()
    await asyncio.sleep(0.5)


async def bar():
    await asyncio.create_subprocess_shell('sleep 1.0')


async def baz():
    await asyncio.sleep(1.0)


asyncio.run(foo())
asyncio.run(bar())