remoteloop: properly close the event loop
Close the event loop when the context is exited, which will clear the internal queues and shut down the executor of the event loop. Not doing this will create a warning when the object is garbage collected.
This commit is contained in:
parent
291fadd0b2
commit
e9c4075bb3
1 changed files with 1 additions and 0 deletions
|
|
@ -101,6 +101,7 @@ class LoopServer:
|
|||
def __exit__(self, *args):
|
||||
self.event_loop.call_soon_threadsafe(self.event_loop.stop)
|
||||
self.thread.join()
|
||||
self.event_loop.close()
|
||||
for lo in self.devs:
|
||||
lo.close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue