mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 10:08:40 -05:00
temporary workaround for pythonthreadpool bug:
http://code.google.com/p/pythonthreadpool/issues/detail?id=5
This commit is contained in:
parent
305198e09e
commit
2c9599813a
1 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
import time
|
||||||
import sys
|
import sys
|
||||||
import errno
|
import errno
|
||||||
from os import listdir
|
from os import listdir
|
||||||
|
|
@ -326,6 +326,7 @@ class Worker(QThread):
|
||||||
def compress_file(self, images, showapp, verbose, imagelist):
|
def compress_file(self, images, showapp, verbose, imagelist):
|
||||||
"""Start the worker thread."""
|
"""Start the worker thread."""
|
||||||
for image in images:
|
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.threadpool.add_job(image.compress, None, return_callback=self.toDisplay.put)
|
||||||
self.showapp = showapp
|
self.showapp = showapp
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue