lapce / lapce/lapce-plugin-rust
Async Requests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 31
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
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.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the handle rpc path and PluginServerRpcHandler, then inspect how responses and the thread-local STATE are handled around requests to a spawned LSP server. The issue is complete when asynchronous requests can have their responses delivered through callbacks while multiple commands proceed without blocking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100