mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Don't starve UI thread when rapidly receiving LSP messages
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
ae415ee49b
commit
80d55fd3d8
1 changed files with 3 additions and 0 deletions
|
@ -201,6 +201,9 @@ impl LanguageServer {
|
|||
std::str::from_utf8(&buffer)?
|
||||
));
|
||||
}
|
||||
|
||||
// Don't starve the main thread when receiving lots of messages at once.
|
||||
smol::future::yield_now().await;
|
||||
}
|
||||
}
|
||||
.log_err()
|
||||
|
|
Loading…
Reference in a new issue