sync::Condvar — blocking condition. tokio::sync::Notify — async notification.
sync::Condvar:
tokio::sync::Notify:
1// Blocking2use std::sync::{Condvar, Mutex};3let pair = (Mutex::new(false), Condvar::new());45// Async6use tokio::sync::Notify;7let notify = Notify::new();8notify.notify_one();
Key: Condvar for blocking, Notify for async.