diff --git a/src/sync/mpsc.rs b/src/sync/mpsc.rs index 8700025..1878794 100644 --- a/src/sync/mpsc.rs +++ b/src/sync/mpsc.rs @@ -1,6 +1,6 @@ use alloc::{arc::Arc, arc::Weak, VecDeque}; use super::Condvar; -use super::ThreadLock as Mutex; +use super::SpinLock as Mutex; struct Channel { deque: Mutex>, @@ -68,6 +68,7 @@ impl Sender { Some(inner) => { let mut deque = inner.deque.lock(); deque.push_back(t); + inner.pushed.notify_one(); Ok(()) } } @@ -135,7 +136,7 @@ pub mod test { drop_full(); drop_full_shared(); smoke_shared(); -// smoke_threads(); // FIXME: deadlock + smoke_threads(); smoke_port_gone(); println!("mpsc test end"); }