File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -361,14 +361,23 @@ impl Condvar {
361361
362362impl fmt:: Debug for Condvar {
363363 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
364- //f.debug_struct("Condvar").finish()
365364 f. pad ( "Condvar { .. }" )
366365 }
367366}
368367
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.
369371struct AwaitNotify < ' a , ' b , T > {
372+ /// The condition variable that we are waiting on
370373 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.
371377 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.
372381 key : Option < usize > ,
373382}
374383
You can’t perform that action at this time.
0 commit comments