Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration with asyncio #489

Open
rr- opened this issue Jul 1, 2021 · 1 comment
Open

Integration with asyncio #489

rr- opened this issue Jul 1, 2021 · 1 comment

Comments

@rr-
Copy link

rr- commented Jul 1, 2021

Related: #488

Let's say I already am running my own event loop (in my particular case it's quamash). How can I integrate this with nvim.run_loop()? As far as I see it ultimately calls pynvim.msgpack_rpc.event_loop.asyncio.AsyncioEventLoop._run:

    def _run(self):
        while self._queued_data:
            self._on_data(self._queued_data.popleft())
        self._loop.run_forever()

Needless to say calling this function is blocking my application, and calling it in a separate thread sprinkles lots of errors about cross-thread calls. Even if I tried to put everything in the same thread, it is unknown how to interact with self.nvim considering how self.nvim.run_loop is blocking.

@justinmk
Copy link
Member

justinmk commented Jul 3, 2021

related #352 #342 #324 #323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants