Skip to content

Integration with asyncioΒ #489

@rr-

Description

@rr-

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions