示例1 一个不完整的示例: let (tx, rx) = channel::unbounded::<Task>(); let mut handlers = vec![]; for _ in 0..number { let rx = rx.clone(); let handle = thread::spawn(move || { while let Some(task) = rx.recv() { task.call_box(); } }); handlers.push(handle);