-
Notifications
You must be signed in to change notification settings - Fork 71
Implement Promise Race #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b1f57b2 to
a204c21
Compare
|
Hey @aapoalas, in this implementation of This means that we are creating a pub struct PromiseGroupRecord<'a> {
pub(crate) promise_group_type: PromiseGroupType,
pub(crate) remaining_elements_count: u32,
pub(crate) result_array: Array<'a>,
pub(crate) promise: Promise<'a>,
}We can keep it like this, or I can create a data structure specially for |
aapoalas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
Hmm.... Do we actually need any kind of PromiseGroup at all...? Or can we just use the normal PromiseResolve stuff? |
Well, I used the The difference is in the Perform Promise Race method, that doesn't use all the state that the other methods use. Even so, I am also using the So if we can accept a slight more memory usage for As for the |
|
What I mean is that when you wrote your very first attempt at implementing |
1b22da0 to
09c954e
Compare
I think I understand. I made another attempt here: #889, without using the |
No description provided.