|
|
@ -82,13 +82,13 @@ pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
|
|
|
|
(sender, receiver)
|
|
|
|
(sender, receiver)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
use alloc::boxed::Box;
|
|
|
|
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
use thread;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub mod test {
|
|
|
|
pub mod test {
|
|
|
|
//! Copied from std::mpsc::test
|
|
|
|
//! Copied from std::mpsc::test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use alloc::boxed::Box;
|
|
|
|
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
use thread;
|
|
|
|
|
|
|
|
|
|
|
|
fn smoke() {
|
|
|
|
fn smoke() {
|
|
|
|
let (tx, rx) = channel::<i32>();
|
|
|
|
let (tx, rx) = channel::<i32>();
|
|
|
|
tx.send(1).unwrap();
|
|
|
|
tx.send(1).unwrap();
|
|
|
|