diff options
Diffstat (limited to 'framework')
-rw-r--r-- | framework/threads.py | 9 |
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)) |