mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-06 02:37:21 +00:00
Use an unbounded channel for waking executor::Deterministic
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
391ad489ff
commit
2e645bcf6a
1 changed files with 3 additions and 3 deletions
|
@ -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<SyncSender<()>>,
|
||||
waker: Option<Sender<()>>,
|
||||
}
|
||||
|
||||
pub struct Deterministic(Arc<Mutex<DeterministicState>>);
|
||||
|
@ -106,7 +106,7 @@ impl Deterministic {
|
|||
T: 'static,
|
||||
F: Future<Output = T> + '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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue