mirror of
https://github.com/9001/copyparty.git
synced 2025-11-24 07:23:22 -07:00
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:
parent
a359b89edd
commit
fb9f0441c9
|
|
@ -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)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue