From 6fb784e61b512b4d84c956810bbef808572aea72 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sun, 24 Mar 2013 15:04:00 -0700 Subject: [PATCH] Making the python thread not hang Vim on exit As the Pytho docs say, "The entire Python program exits when no alive non-daemon threads are left." Basically, the daemon threads are safely killed. --- python/completers/python/jedi_completer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/completers/python/jedi_completer.py b/python/completers/python/jedi_completer.py index 810b64c0..05760436 100644 --- a/python/completers/python/jedi_completer.py +++ b/python/completers/python/jedi_completer.py @@ -57,6 +57,7 @@ class JediCompleter( Completer ): def _start_completion_thread( self ): self._completion_thread = Thread( target=self.SetCandidates ) + self._completion_thread.daemon = True self._completion_thread.start()