File tree 1 file changed +10
-1
lines changed
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,23 @@ impl Condvar {
361
361
362
362
impl fmt:: Debug for Condvar {
363
363
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
364
- //f.debug_struct("Condvar").finish()
365
364
f. pad ( "Condvar { .. }" )
366
365
}
367
366
}
368
367
368
+ /// A future that waits for another task to notify the condition variable.
369
+ ///
370
+ /// This is an internal future that `wait` and `wait_until` await on.
369
371
struct AwaitNotify < ' a , ' b , T > {
372
+ /// The condition variable that we are waiting on
370
373
cond : & ' a Condvar ,
374
+ /// The lock used with `cond`.
375
+ /// This will be released the first time the future is polled,
376
+ /// after registering the context to be notified.
371
377
guard : Option < MutexGuard < ' b , T > > ,
378
+ /// A key into the conditions variable's `WakerSet`.
379
+ /// This is set to the index of the `Waker` for the context each time
380
+ /// the future is polled and not completed.
372
381
key : Option < usize > ,
373
382
}
374
383
You can’t perform that action at this time.
0 commit comments