diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2015-11-10 04:29:38 +0100 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2015-11-10 04:32:52 +0100 |
commit | 77c2e933dcb68f30e439d1c95e0631ae16341a2f (patch) | |
tree | 9d1bd7547d080a5e6715765f47cca50cb79bb534 /examples | |
parent | b607be5e54dce2e6044e565f798b002887dbaf19 (diff) |
Renamed a few variables in examples/asyncio-prompt.py
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/asyncio-prompt.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/asyncio-prompt.py b/examples/asyncio-prompt.py index 5db9b181..0fa4cf42 100755 --- a/examples/asyncio-prompt.py +++ b/examples/asyncio-prompt.py @@ -61,14 +61,14 @@ async def interactive_shell(): def main(): - shell = loop.create_task(interactive_shell()) - - # This gathers all the async calls, so they can be cancelled at once - tasks = asyncio.gather(print_counter(), return_exceptions=True) - - loop.run_until_complete(shell) - tasks.cancel() - loop.run_until_complete(tasks) + shell_task = loop.create_task(interactive_shell()) + + # Gather all the async calls, so they can be cancelled at once + background_task = asyncio.gather(print_counter(), return_exceptions=True) + + loop.run_until_complete(shell_task) + background_task.cancel() + loop.run_until_complete(background_task) print('Qutting event loop. Bye.') loop.close() |