From 2e645bcf6afd37855cde52ed03e203a6b231de0b Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 13 Jul 2021 18:46:48 +0200 Subject: [PATCH] Use an unbounded channel for waking `executor::Deterministic` Co-Authored-By: Nathan Sobo Co-Authored-By: Max Brunsfeld --- gpui/src/executor.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gpui/src/executor.rs b/gpui/src/executor.rs index 037754d402fcd5598c68cbceeee5ee05b838ee86..a7c2eaaecc92c6668578c1a6b10bcf426cc6ad8e 100644 --- a/gpui/src/executor.rs +++ b/gpui/src/executor.rs @@ -13,7 +13,7 @@ use std::{ rc::Rc, sync::{ atomic::{AtomicBool, Ordering::SeqCst}, - mpsc::SyncSender, + mpsc::Sender, Arc, }, thread, @@ -43,7 +43,7 @@ struct DeterministicState { seed: u64, scheduled: Vec<(Runnable, Backtrace)>, spawned_from_foreground: Vec<(Runnable, Backtrace)>, - waker: Option>, + waker: Option>, } pub struct Deterministic(Arc>); @@ -106,7 +106,7 @@ impl Deterministic { T: 'static, F: Future + 'static, { - let (wake_tx, wake_rx) = std::sync::mpsc::sync_channel(32); + let (wake_tx, wake_rx) = std::sync::mpsc::channel(); let state = self.0.clone(); state.lock().waker = Some(wake_tx);