Right now each new asynchronous message from Neovim spawns a real new thread to handle it. This is obviously not the way to go; in the reference Python implementation this is solved by using green threads instead, which seems much more sensible.
I am also not completely sure whether or not async calls should return a future (as per msgpack-rpc spec) or just completely ignore the result (which seems to be what the Python implementation does, if I understand it correctly).
The current event loops are also very hacky and should probably be rewritten.
Right now each new asynchronous message from Neovim spawns a real new thread to handle it. This is obviously not the way to go; in the reference Python implementation this is solved by using green threads instead, which seems much more sensible.
I am also not completely sure whether or not async calls should return a future (as per msgpack-rpc spec) or just completely ignore the result (which seems to be what the Python implementation does, if I understand it correctly).
The current event loops are also very hacky and should probably be rewritten.