From 143ea24875caeda26a31a90e702749bf16f19452 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 17 May 2021 20:50:00 -0600 Subject: [PATCH] Reintroduce the 100ms delay when polling worktree entries This regressed when I switched us over to the simplified async approach. I think it was causing us to contend on the mutex on during startup. --- zed/src/worktree.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/zed/src/worktree.rs b/zed/src/worktree.rs index 2a924cf586..cc9ced3b71 100644 --- a/zed/src/worktree.rs +++ b/zed/src/worktree.rs @@ -145,6 +145,7 @@ impl Worktree { if self.is_scanning() && !self.poll_scheduled { ctx.spawn(|this, mut ctx| async move { + smol::Timer::after(Duration::from_millis(100)).await; this.update(&mut ctx, |this, ctx| { this.poll_scheduled = false; this.poll_entries(ctx);