use std::thread::spawn; use crossbeam_channel::{bounded, Receiver}; type S0 = Receiver>>>>>>>>; type S1 = Receiver>>>>>>>; type S2 = Receiver>>>>>>; type S3 = Receiver>>>>>; type S4 = Receiver>>>>; type S5 = Receiver>>>; type S6 = Receiver>>; type S7 = Receiver>; type S8 = Receiver<()>; type S9 = (); fn main() { let main = spawn(move || { for _ in 0..LOOPS { let (sender_s_0, receiver_s_0) = bounded::(1); let (sender_s_1, receiver_s_1) = bounded::(1); let (sender_s_2, receiver_s_2) = bounded::(1); let (sender_s_3, receiver_s_3) = bounded::(1); let (sender_s_4, receiver_s_4) = bounded::(1); let (sender_s_5, receiver_s_5) = bounded::(1); let (sender_s_6, receiver_s_6) = bounded::(1); let (sender_s_7, receiver_s_7) = bounded::(1); let (sender_s_8, receiver_s_8) = bounded::(1); let (sender_s_9, receiver_s_9) = bounded::(1); sender_s_0.send(receiver_s_1).unwrap(); let receiver_s_1_bis = receiver_s_0.recv().unwrap(); sender_s_1.send(receiver_s_2).unwrap(); let receiver_s_2_bis = receiver_s_1_bis.recv().unwrap(); sender_s_2.send(receiver_s_3).unwrap(); let receiver_s_3_bis = receiver_s_2_bis.recv().unwrap(); sender_s_3.send(receiver_s_4).unwrap(); let receiver_s_4_bis = receiver_s_3_bis.recv().unwrap(); sender_s_4.send(receiver_s_5).unwrap(); let receiver_s_5_bis = receiver_s_4_bis.recv().unwrap(); sender_s_5.send(receiver_s_6).unwrap(); let receiver_s_6_bis = receiver_s_5_bis.recv().unwrap(); sender_s_6.send(receiver_s_7).unwrap(); let receiver_s_7_bis = receiver_s_6_bis.recv().unwrap(); sender_s_7.send(receiver_s_8).unwrap(); let receiver_s_8_bis = receiver_s_7_bis.recv().unwrap(); sender_s_8.send(receiver_s_9).unwrap(); let receiver_s_9_bis = receiver_s_8_bis.recv().unwrap(); sender_s_9.send(()).unwrap(); receiver_s_9_bis.recv().unwrap(); } }); main.join().unwrap(); } static LOOPS: i64 = 100;