Commit 9c27bac
committed
Handle inlay hint requests asynchronously
Inlay hints on Dockerfiles need to fetch data so it can take some time
before the result can be returned. This means that everything else gets
blocked because all JSON-RPC messages are being handled synchronously at
the moment. To alleviate this problem, we will check for inlay hint
requests and then handle them in a goroutine asynchronously so that
other messages can continue to be processed.
Other messages may be changed to be handled asynchronously in the future
but only inlay hint requests will be done this way for the time being.
We want to be careful about introducing drastic changes to how messages
are being handled as it is critical for the operation of the language
server.
Signed-off-by: Remy Suen <remy.suen@docker.com>1 parent 549e358 commit 9c27bac
2 files changed
Lines changed: 25 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
12 | 33 | | |
13 | 34 | | |
14 | 35 | | |
15 | | - | |
| 36 | + | |
16 | 37 | | |
17 | 38 | | |
18 | 39 | | |
| |||
0 commit comments