1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-23 00:16:17 +04:00
This commit is contained in:
WangRunji 2018-06-05 13:38:45 +08:00
parent bf46193c01
commit 646a88e4a6

View File

@ -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<T> {
deque: Mutex<VecDeque<T>>,
@ -68,6 +68,7 @@ impl<T> Sender<T> {
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");
}