aboutsummarybugs & patchesrefslogtreecommitdiffstats
path: root/src/discord_image_bridge
diff options
context:
space:
mode:
authorVosjedev <vosje@vosjedev.net>2026-01-24 15:24:03 +0100
committerVosjedev <vosje@vosjedev.net>2026-01-24 15:24:03 +0100
commit29b147a2f2816152aa7c2f4ac897116bb5766c2a (patch)
tree447bbb089e0b6aa51511de599ecf9877b4ea8e74 /src/discord_image_bridge
parent919a9e7e35f509afb2c499ab05e4fea91fe4fca5 (diff)
downloaddiscord_image_bridge-29b147a2f2816152aa7c2f4ac897116bb5766c2a.tar.gz
discord_image_bridge-29b147a2f2816152aa7c2f4ac897116bb5766c2a.tar.bz2
discord_image_bridge-29b147a2f2816152aa7c2f4ac897116bb5766c2a.tar.xz
speed up exiting of download pool
Signed-off-by: Vosjedev <vosje@vosjedev.net>
Diffstat (limited to 'src/discord_image_bridge')
-rw-r--r--src/discord_image_bridge/downloadpool.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/discord_image_bridge/downloadpool.py b/src/discord_image_bridge/downloadpool.py
index a8654dd..d86513e 100644
--- a/src/discord_image_bridge/downloadpool.py
+++ b/src/discord_image_bridge/downloadpool.py
@@ -39,6 +39,7 @@ class DownloadPool():
def _wrap(self):
while not self.stopping.is_set():
with self.lock:
+ if self.stopping.is_set(): continue # to not block for 5 seconds while stopping
try:
data=self.queue.get(block=True,timeout=5)
except Empty: