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)
This commit is contained in:
ed 2025-11-23 21:45:03 +09:00
parent a359b89edd
commit fb9f0441c9

View file

@ -270,6 +270,9 @@ class ThumbSrv(object):
def shutdown(self) -> None: def shutdown(self) -> None:
self.stopping = True self.stopping = True
Daemon(self._fire_sentinels, "thumbstopper")
def _fire_sentinels(self):
for _ in range(self.nthr): for _ in range(self.nthr):
self.q.put(None) self.q.put(None)