Update main.rs

pull/887/head
qwer252 6 days ago committed by GitHub
parent 41c73fa626
commit 90d4405813
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -47,11 +47,11 @@ fn get_messages() -> impl Stream<Item = String> {
fn get_intervals() -> impl Stream<Item = u32> {
let (tx, rx) = trpl::channel();
// This is *not* `trpl::spawn` but `std::thread::spawn`!
// 这里*不是* `trpl::spawn` ,是 `std::thread::spawn`!
thread::spawn(move || {
let mut count = 0;
loop {
// Likewise, this is *not* `trpl::sleep` but `std::thread::sleep`!
// 同样, 这里*不是* `trpl::sleep` ,是 `std::thread::sleep`!
thread::sleep(Duration::from_millis(1));
count += 1;

Loading…
Cancel
Save