Skip to content

Commit 5f76c12

Browse files
committed
f add docs on wtf the types are
1 parent 5980a9a commit 5f76c12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/util/wakers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ impl Sleeper {
212212
pub fn new(futures: Vec<Future>) -> Self {
213213
Self { notifiers: futures.into_iter().map(|f| f.state).collect() }
214214
}
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.
215218
fn setup_wait(&self) -> (Arc<Condvar>, Arc<Mutex<Option<Arc<Mutex<FutureState>>>>>) {
216219
let cv = Arc::new(Condvar::new());
217220
let notified_fut_mtx = Arc::new(Mutex::new(None));

0 commit comments

Comments
 (0)