[gedit-code-assistance] Actually run the threads as threads



commit dfa7f4e89436e35b70d13749b7f77d0c8ba3218b
Author: Garrett Regier <garrettregier gmail com>
Date:   Mon Mar 18 00:52:03 2013 -0700

    Actually run the threads as threads
    
    Also make them daemons, that way when to process
    wants to close it can.

 backends/python/gcpbackendpython/document.py |    3 ++-
 backends/xml/gcpbackendxml/document.py       |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/backends/python/gcpbackendpython/document.py b/backends/python/gcpbackendpython/document.py
index 6331061..37b7b03 100644
--- a/backends/python/gcpbackendpython/document.py
+++ b/backends/python/gcpbackendpython/document.py
@@ -103,7 +103,8 @@ class Document(Gcp.Document, Gcp.DiagnosticSupport):
         self.reparse_timeout = 0
 
         self.reparse_thread = ParseThread(self, self.on_parse_finished)
-        self.reparse_thread.run()
+        self.reparse_thread.daemon = True
+        self.reparse_thread.start()
 
         return False
 
diff --git a/backends/xml/gcpbackendxml/document.py b/backends/xml/gcpbackendxml/document.py
index 04853b2..66c6831 100644
--- a/backends/xml/gcpbackendxml/document.py
+++ b/backends/xml/gcpbackendxml/document.py
@@ -257,7 +257,8 @@ class Document(Gcp.Document, Gcp.DiagnosticSupport):
         self.reparse_timeout = 0
 
         self.reparse_thread = ParseThread(self, self.on_parse_finished)
-        self.reparse_thread.run()
+        self.reparse_thread.daemon = True
+        self.reparse_thread.start()
 
         return False
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]