From c4e6606fc8ca42ec5fd0f9f0072c2509fd43fd14 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Sun, 27 Sep 2015 17:02:37 -0500 Subject: [PATCH] upgrade plug version --- nvim/nvim.symlink/autoload/plug.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nvim/nvim.symlink/autoload/plug.vim b/nvim/nvim.symlink/autoload/plug.vim index e21e8dc..edf9552 100644 --- a/nvim/nvim.symlink/autoload/plug.vim +++ b/nvim/nvim.symlink/autoload/plug.vim @@ -1182,6 +1182,17 @@ class Command(object): self.proc = subprocess.Popen(self.cmd, cwd=self.cmd_dir, stdout=tfile, stderr=subprocess.STDOUT, shell=True, preexec_fn=os.setsid) + thrd = thr.Thread(target=(lambda proc: proc.wait()), args=(self.proc,)) + thrd.start() + + thread_not_started = True + while thread_not_started: + try: + thrd.join(0.1) + thread_not_started = False + except RuntimeError: + pass + while self.alive: if G_STOP.is_set(): raise KeyboardInterrupt @@ -1196,7 +1207,7 @@ class Command(object): if time_diff > self.timeout: raise CmdTimedOut(['Timeout!']) - time.sleep(0.33) + thrd.join(0.5) tfile.seek(0) result = [line.decode('utf-8', 'replace').rstrip() for line in tfile]