some more optimizations

This commit is contained in:
Miroslav Stampar
2011-11-22 10:54:29 +00:00
parent 267d67b024
commit 9697e80013
5 changed files with 24 additions and 14 deletions

View File

@@ -129,6 +129,9 @@ def main():
kb.threadContinue = False
kb.threadException = True
if conf.hashDB:
conf.hashDB.flush(True)
# Reference: http://stackoverflow.com/questions/1635080/terminate-a-multi-thread-python-program
if hasattr(conf, "threads") and conf.threads > 1:
os._exit(0)