From fb9f0441c99833ab7bc035d76b9a89021270675a Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 23 Nov 2025 21:45:03 +0900 Subject: [PATCH] fix possible deadlock on shutdown; if a ?tar=w is hammering the thumbnailer queue on shutdown, give up issuing sentinels (the workers will see !!stopping and abort anyways) --- copyparty/th_srv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/copyparty/th_srv.py b/copyparty/th_srv.py index 2faee236..684367c5 100644 --- a/copyparty/th_srv.py +++ b/copyparty/th_srv.py @@ -270,6 +270,9 @@ class ThumbSrv(object): def shutdown(self) -> None: self.stopping = True + Daemon(self._fire_sentinels, "thumbstopper") + + def _fire_sentinels(self): for _ in range(self.nthr): self.q.put(None)