Skip to content

Conversation

@HoshimiP
Copy link
Contributor

No description provided.

@AsakuraMizu
Copy link
Contributor

Great work 👍

tests/async.rs Outdated
Comment on lines 80 to 82
if i % 2 == 0 {
flag.store(true, Ordering::SeqCst);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider moving this after barrier.wait().await and before ps.wake(), or f.await just immediately returns in these tasks.

tests/async.rs Outdated
Comment on lines 98 to 99
task::yield_now().await;
assert_eq!(counter.count(), 33);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the counter and carefully check the corresponding task is finished?

tests/async.rs Outdated
Comment on lines 85 to 87
let results = future::join_all(ready).await;
assert_eq!(results.len(), 33);
assert!(results.into_iter().all(|r| r.is_ok()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] This can be simplified by using try_join_all.

tests/async.rs Outdated
Comment on lines 95 to 97
let results = future::join_all(pending).await;
assert_eq!(results.len(), 32);
assert!(results.into_iter().all(|r| r.is_ok()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Nitpick] Same here.

@AsakuraMizu AsakuraMizu merged commit ba285f6 into Starry-OS:main Nov 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants