From 2c9599813ad15472fea0089e86911501bec33296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1lm=C3=A1n=20Tarnay?= Date: Thu, 1 Apr 2010 00:41:12 +0200 Subject: [PATCH] temporary workaround for pythonthreadpool bug: http://code.google.com/p/pythonthreadpool/issues/detail?id=5 --- src/trimage/trimage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trimage/trimage.py b/src/trimage/trimage.py index 216ea26..a8963c4 100755 --- a/src/trimage/trimage.py +++ b/src/trimage/trimage.py @@ -1,5 +1,5 @@ #!/usr/bin/python - +import time import sys import errno from os import listdir @@ -326,6 +326,7 @@ class Worker(QThread): def compress_file(self, images, showapp, verbose, imagelist): """Start the worker thread.""" for image in images: + time.sleep(0.05) #FIXME: Workaround http://code.google.com/p/pythonthreadpool/issues/detail?id=5 self.threadpool.add_job(image.compress, None, return_callback=self.toDisplay.put) self.showapp = showapp self.verbose = verbose