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

Async Requests #22

Open
MinusGix opened this issue Sep 10, 2023 · 0 comments
Open

Async Requests #22

MinusGix opened this issue Sep 10, 2023 · 0 comments

Comments

@MinusGix
Copy link
Member

It would be good to have the ability to send asynchronous requests, and handle the result via a callback.
Ex: Sending a command to a spawned LSP server shouldn't typically need to block the plugin. It can typically handle multiple requests (like multiple commands being ran) that it then can immediately send to the likely-multithreaded LSP for processing.

This would probably require modifying handle rpc to take into account responses. Possibly having some sort of HashMap<Id, Callback> store on PluginServerRpcHandler.

(Or we could use actual Rust async but I'm unsure of the nicest way to fit that into this. Also we currently have STATE be a thread local, etc.)

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

1 participant