Merge pull request #10 from LeetCode-OpenSource/fix_race_conditions

Fix race condition on stopping lsp client
This commit is contained in:
Yeger 2020-01-14 22:39:53 +02:00 committed by GitHub
commit d4d59dc08c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,9 @@ class LspEndpoint(threading.Thread):
cond.acquire()
self.send_message(method_name, kwargs, current_id)
if self.shutdown_flag:
return None
cond.wait()
cond.release()