mirror of
https://github.com/Kilian/Trimage.git
synced 2026-01-26 10:08:40 -05:00
Merge branch 'parallel' of git://github.com/kalmi/Trimage into parallel
This commit is contained in:
commit
a5da8a9a58
2 changed files with 42 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import time
|
||||
import sys
|
||||
import errno
|
||||
from os import listdir
|
||||
|
|
@ -329,6 +329,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue