Skip to content
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

Remove unnecessary await in MODULARIZE=instance mode. NFC #23219

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 18, 2024

Since the init function is already marks as async it fine/better to simply return the promise here rather than awaiting on it.

Since the init function is already marks as async it fine/better to
simply return the promise here rather than awaiting on it.
@sbc100 sbc100 changed the title Remove unnecessary await in MODULARIZE=instance mode. NFC Remove unnecessary await in MODULARIZE=instance mode. NFC Dec 18, 2024
@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 18, 2024

I might land this TBR since @brendandahl is already out for the holidays and the seem fairly self-evidently fine.

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

iiuc this is unneeded as the caller must await anyhow?

@sbc100
Copy link
Collaborator Author

sbc100 commented Dec 18, 2024

iiuc this is unneeded as the caller must await anyhow?

Yes, either way the caller will receive a promise in return, since that is what async on the declaration guarantees.

@sbc100 sbc100 merged commit adb972c into emscripten-core:main Dec 18, 2024
24 of 29 checks passed
@sbc100 sbc100 deleted the remove_await branch December 18, 2024 22:41
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