File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
futures-util/src/stream/futures_unordered Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -501,7 +501,7 @@ impl<Fut: Future> Stream for FuturesUnordered<Fut> {
501
501
// deallocating the task if need be.
502
502
let res = {
503
503
let task = bomb. task . as_ref ( ) . unwrap ( ) ;
504
- // We are only interested in whether the future waken before it
504
+ // We are only interested in whether the future is awoken before it
505
505
// finishes polling, so reset the flag here.
506
506
task. woken . store ( false , Relaxed ) ;
507
507
let waker = Task :: waker_ref ( task) ;
@@ -517,8 +517,8 @@ impl<Fut: Future> Stream for FuturesUnordered<Fut> {
517
517
match res {
518
518
Poll :: Pending => {
519
519
let task = bomb. task . take ( ) . unwrap ( ) ;
520
- // If the future waken before it finishes polling, we assume
521
- // the future yields .
520
+ // If the future was awoken during polling, we assume
521
+ // the future wanted to explicitly yield .
522
522
let yielded = task. woken . load ( Relaxed ) ;
523
523
bomb. queue . link ( task) ;
524
524
You can’t perform that action at this time.
0 commit comments