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> {
501501 // deallocating the task if need be.
502502 let res = {
503503 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
505505 // finishes polling, so reset the flag here.
506506 task. woken . store ( false , Relaxed ) ;
507507 let waker = Task :: waker_ref ( task) ;
@@ -517,8 +517,8 @@ impl<Fut: Future> Stream for FuturesUnordered<Fut> {
517517 match res {
518518 Poll :: Pending => {
519519 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 .
522522 let yielded = task. woken . load ( Relaxed ) ;
523523 bomb. queue . link ( task) ;
524524
You can’t perform that action at this time.
0 commit comments