File tree 4 files changed +2
-46
lines changed
4 files changed +2
-46
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ edition = "2021"
8
8
[dependencies ]
9
9
async-channel = " 1.7.1"
10
10
async-priority-channel = " 0.1.0"
11
- atomic_mpmc = " 0.2.0"
12
11
broadcaster = " 1.0.0"
13
12
crossfire = " 0.1.7"
14
13
flume = " 0.10.14"
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ fn main() {
8
8
9
9
crossfire_mpsc ( ) ;
10
10
crossfire_mpmc ( ) ;
11
- atomic_mpmc ( ) ;
12
11
flume_example ( ) ;
13
12
async_channel_example ( ) ;
14
13
async_priority_channel_example ( ) ;
Original file line number Diff line number Diff line change @@ -74,49 +74,7 @@ pub fn crossfire_mpmc() {
74
74
} ) ;
75
75
}
76
76
77
- // rx can't aware tx close
78
- pub fn atomic_mpmc ( ) {
79
- // let (tx, rx) = channel::<i32>(10);
80
-
81
- // let mut sender_handles = vec![];
82
- // for v in 0..4 {
83
- // let tx = tx.clone();
84
- // let handle = thread::spawn(move || {
85
- // for i in 0i32..10 {
86
- // if i % 5 != v {
87
- // continue;
88
- // }
89
- // let _ = tx.send(i).unwrap();
90
- // println!("thread {} atomic_mpmc sent {}", v, i);
91
- // }
92
- // });
93
-
94
- // sender_handles.push(handle);
95
- // }
96
-
97
- // let mut handles = vec![];
98
- // for i in 0..4 {
99
- // let rx = rx.clone();
100
- // let handle = thread::spawn(move || loop {
101
- // if let Ok(_i) = rx.recv() {
102
- // println!("atomic_mpmc thread {} recv {}", i, _i);
103
- // } else {
104
- // println!("atomic_mpmc rx closed");
105
- // break;
106
- // }
107
- // });
108
- // handles.push(handle);
109
- // }
110
-
111
- // for handle in sender_handles {
112
- // handle.join().unwrap();
113
- // }
114
- // drop((tx,rx));
115
-
116
- // for handle in handles {
117
- // handle.join().unwrap();
118
- // }
119
- }
77
+
120
78
121
79
// has issues.
122
80
pub fn broadcaster ( ) {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ futures = "0.3.25"
27
27
oneshot = " 0.1.5"
28
28
portable-atomic = { version = " 0.3" , features =[" float" ] }
29
29
process_lock = " 0.1.0"
30
- scc = " 0.11.1 "
30
+ scc = " 1.5.0 "
31
31
sharded-slab = " 0.1.4"
32
32
simple-mutex = " 1.1.5"
33
33
singleflight = " 0.2.0"
You can’t perform that action at this time.
0 commit comments