Show More
@@ -486,6 +486,7 b' class HistorySavingThread(threading.Thread):' | |||
|
486 | 486 | |
|
487 | 487 | def run(self): |
|
488 | 488 | # We need a separate db connection per thread: |
|
489 | try: | |
|
489 | 490 | self.db = sqlite3.connect(self.history_manager.hist_file) |
|
490 | 491 | while True: |
|
491 | 492 | self.history_manager.save_flag.wait() |
@@ -493,6 +494,9 b' class HistorySavingThread(threading.Thread):' | |||
|
493 | 494 | return |
|
494 | 495 | self.history_manager.save_flag.clear() |
|
495 | 496 | self.history_manager.writeout_cache(self.db) |
|
497 | except Exception as e: | |
|
498 | print(("The history saving thread hit an unexpected error (%s)." | |
|
499 | "History will not be written to the database.") % repr(e)) | |
|
496 | 500 | |
|
497 | 501 | def stop(self): |
|
498 | 502 | """This can be called from the main thread to safely stop this thread. |
General Comments 0
You need to be logged in to leave comments.
Login now