Merge pull request #10 from LeetCode-OpenSource/fix_race_conditions
Fix race condition on stopping lsp client
This commit is contained in:
commit
d4d59dc08c
@ -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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user