diff piecrust/workerpool.py @ 702:c62d83e17abf

bake: Some more optimizations. Write the output files in a background thread to get away from the GIL.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 16 Apr 2016 22:50:07 -0700
parents 9e5393fcfab2
children 4850f8c21b6e
line wrap: on
line diff
--- a/piecrust/workerpool.py	Sat Apr 16 22:48:57 2016 -0700
+++ b/piecrust/workerpool.py	Sat Apr 16 22:50:07 2016 -0700
@@ -26,6 +26,9 @@
     def getReport(self, pool_reports):
         return None
 
+    def shutdown(self):
+        pass
+
 
 TASK_JOB = 0
 TASK_BATCH = 1
@@ -149,6 +152,8 @@
         reader_thread.join()
         writer_thread.join()
 
+    w.shutdown()
+
     logger.debug("Worker %d completed %d tasks." % (wid, completed))