add router shutdown and task cancellation control

This commit is contained in:
2024-05-12 00:46:08 -07:00
parent 16e2e94e2a
commit 52ff2622f3
5 changed files with 104 additions and 35 deletions

View File

@@ -401,6 +401,5 @@ class PathListener(Listener[FileEvent]):
self.write.write(b"\x00")
self.write.close()
if self.router.thread_pool is not None:
self.router.thread_pool.shutdown()
self.router.shutdown()