From 61397f2f2fcb2a893f68034df0e849aecf9c3d65 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 20 Jul 2021 11:37:02 -0700 Subject: [PATCH] Avoid holding executor's state lock while parked Co-Authored-By: Nathan Sobo --- gpui/src/executor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpui/src/executor.rs b/gpui/src/executor.rs index bc23b63fcc4816e4f2a8bef1a0de7e37033918db..e437a9597f9a931f9e5b72484f41a7b11ae2618b 100644 --- a/gpui/src/executor.rs +++ b/gpui/src/executor.rs @@ -150,7 +150,7 @@ impl Deterministic { if let Poll::Ready(result) = future.as_mut().poll(&mut cx) { return Some(result); } - let state = &mut *self.state.lock(); + let state = self.state.lock(); if state.scheduled.is_empty() && state.spawned_from_foreground.is_empty() { if state.forbid_parking { panic!("deterministic executor parked after a call to forbid_parking");