summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2011-02-07 18:55:01 -0800
committerChad Versace <chad.versace@intel.com>2011-02-10 13:38:24 -0800
commit59a63ce811db7fe69d3ba215109856a254b4ef77 (patch)
tree132737f81ce58d2990163b43e9955377d5bd0c7b /framework
parent4d87ef44973e30b073f62e63ebfdd31197aaf18f (diff)
Respond to KeyboardInterrupt exception.
Respond to KeyboardInterrupt exception so that execution can clean up and write a summary file before shutting down.
Diffstat (limited to 'framework')
-rw-r--r--framework/threads.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/framework/threads.py b/framework/threads.py
index 0e420f2f..edd7eded 100644
--- a/framework/threads.py
+++ b/framework/threads.py
@@ -71,5 +71,10 @@ class ThreadPools(Singleton):
def joinAll(self):
pools = list(self.threadpools.itervalues())
- for pool in pools:
- pool.wait()
+ try:
+ for pool in pools:
+ pool.wait()
+ except KeyboardInterrupt:
+ pools = list(self.threadpools.itervalues())
+ for pool in pools:
+ pool.dismissWorkers(len(pool.workers))