Examples: close the event loop at exit

This commit is contained in:
Victor Stinner
2014-07-02 01:26:08 +02:00
parent 6498249322
commit 7cf3851dc3
10 changed files with 23 additions and 4 deletions

View File

@@ -80,6 +80,7 @@ def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(start(
'sleep 2; wc', input=[b'foo bar baz\n'*300 for i in range(100)]))
loop.close()
if __name__ == '__main__':