def run_forever():
    'Runs the asyncio event loop with and\n    ensures state machines are exited upon a KeyboardInterrupt.\n    '
    loop = asyncio.get_event_loop()
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        Framework.stop()
    loop.close()
Runs the asyncio event loop with and
ensures state machines are exited upon a KeyboardInterrupt.
def run_forever():
    'Runs the asyncio event loop with and\n    ensures state machines are exited upon a KeyboardInterrupt.\n    '
    loop = asyncio.get_event_loop()
    try:
        loop.run_forever()
    except KeyboardInterrupt:
        Framework.stop()
    loop.close()