Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-jpq committed Jul 9, 2023
1 parent 1795394 commit 7c6d004
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynvim_pp/nvim.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,14 @@ async def cont() -> None:
except Exception as e:
with suppress(InvalidStateError):
f1.set_exception(e)
finally:
with suppress(InvalidStateError):
f2.set_result(None)

th = Thread(daemon=True, target=lambda: run(cont()))
th.start()
try:
yield await wrap_future(f1)
finally:
with suppress(InvalidStateError):
f2.set_result(None)
yield await wrap_future(f1)
await wrap_future(f2)


Nvim = _Nvim()

0 comments on commit 7c6d004

Please sign in to comment.