Preserve the order of responses with respect to all other incoming messages

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
Antonio Scandurra 2022-01-12 18:26:00 +01:00
parent 9e4b118214
commit 8b53868f8a
5 changed files with 57 additions and 46 deletions

View file

@ -600,7 +600,6 @@ impl Worktree {
// We spawn here in order to enqueue the sending of `Ack` *after* transmission of edits
// associated with formatting.
cx.spawn(|_| async move {
dbg!("responding");
match format {
Ok(()) => rpc.respond(receipt, proto::Ack {}).await?,
Err(error) => {
@ -923,7 +922,6 @@ impl Worktree {
)),
} {
cx.spawn(|worktree, mut cx| async move {
dbg!(&operation);
if let Err(error) = rpc
.request(proto::UpdateBuffer {
project_id,