This commit is contained in:
Max Brunsfeld 2023-11-01 11:59:49 -07:00 committed by Nathan Sobo
parent 57ffa8201e
commit dd1a2a9e44
16 changed files with 138 additions and 181 deletions

View file

@ -1047,8 +1047,9 @@ impl FakeLanguageServer {
.on_request::<T, _, _>(move |params, cx| {
let result = handler(params, cx.clone());
let responded_tx = responded_tx.clone();
let executor = cx.background_executor().clone();
async move {
cx.background_executor().simulate_random_delay().await;
executor.simulate_random_delay().await;
let result = result.await;
responded_tx.unbounded_send(()).ok();
result