details
This commit is contained in:
parent
02e5a9dfc7
commit
a14b0c9574
1 changed files with 7 additions and 3 deletions
|
@ -73,11 +73,11 @@ async def main(event):
|
||||||
def terminate(event, signal):
|
def terminate(event, signal):
|
||||||
"""Close handling stuff."""
|
"""Close handling stuff."""
|
||||||
event.set()
|
event.set()
|
||||||
loop = asyncio.get_event_loop()
|
asyncio.get_event_loop().remove_signal_handler(signal)
|
||||||
loop.remove_signal_handler(signal)
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def run():
|
||||||
|
"""Launch everything."""
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
event = asyncio.Event()
|
event = asyncio.Event()
|
||||||
|
|
||||||
|
@ -87,3 +87,7 @@ if __name__ == '__main__':
|
||||||
loop.run_until_complete(main(event))
|
loop.run_until_complete(main(event))
|
||||||
|
|
||||||
loop.close()
|
loop.close()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
run()
|
||||||
|
|
Loading…
Reference in a new issue