diff --git a/18-asyncio-py3.7/spinner_asyncio.py b/18-asyncio-py3.7/spinner_asyncio.py index 369a8f0..ccb1bf7 100755 --- a/18-asyncio-py3.7/spinner_asyncio.py +++ b/18-asyncio-py3.7/spinner_asyncio.py @@ -36,11 +36,11 @@ async def supervisor(): # <6> return result -def main(): - result = asyncio.run(supervisor()) # <11> +async def main(): + result = await supervisor() # <11> print('Answer:', result) if __name__ == '__main__': - main() + await main() # END SPINNER_ASYNCIO