Skip to content

Commit 0761de3

Browse files
committed
add sleep in index()
1 parent 9e84c9b commit 0761de3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

samples/async/aio_web.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
from aiohttp import web
1313

14-
def index(request):
14+
async def index(request):
15+
await asyncio.sleep(0.5)
1516
return web.Response(body=b'<h1>Index</h1>')
1617

1718
async def hello(request):

0 commit comments

Comments
 (0)