asyncio event loop tags code example
Example: new event loop asyncio
import asyncio
async def foo(loop):
print('foo')
loop.stop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop) # <----
asyncio.ensure_future(foo(loop))
loop.run_forever()