We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5980a9a commit 5f76c12Copy full SHA for 5f76c12
lightning/src/util/wakers.rs
@@ -212,6 +212,9 @@ impl Sleeper {
212
pub fn new(futures: Vec<Future>) -> Self {
213
Self { notifiers: futures.into_iter().map(|f| f.state).collect() }
214
}
215
+ /// Prepares to go into a wait loop body, creating a condition variable which we can block on
216
+ /// and an `Arc<Mutex<Option<_>>>` which gets set to the waking `Future`'s state prior to the
217
+ /// condition variable being woken.
218
fn setup_wait(&self) -> (Arc<Condvar>, Arc<Mutex<Option<Arc<Mutex<FutureState>>>>>) {
219
let cv = Arc::new(Condvar::new());
220
let notified_fut_mtx = Arc::new(Mutex::new(None));
0 commit comments