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

runtime: async preemption (or alternative) for js/wasm #71134

Open
prattmic opened this issue Jan 6, 2025 · 0 comments
Open

runtime: async preemption (or alternative) for js/wasm #71134

prattmic opened this issue Jan 6, 2025 · 0 comments
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Jan 6, 2025

This is split from #65178, as the specific scheduler bug was fixed.

Due to its single-threaded nature, js/wasm have no sysmon thread, and thus no asynchronous preemption. Thus the pitfalls of Go prior to asynchronous preemption apply: tight loops that fail to yield may delay scheduling indefinitely.

This is a tracking issue for problems due to the lack of asynchronous preemption. As noted in #36365, due to the lack of threading, asynchronous preemption isn't possible today, but perhaps could be with wasm threads? Or we could have an alternative scheme for js/wasm (such as adding preemption points to loops).

(Plan9 is also missing async preemption, but that simply needs an implementation)

@prattmic prattmic added NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. compiler/runtime Issues related to the Go compiler and/or runtime. labels Jan 6, 2025
@prattmic prattmic added this to the Unplanned milestone Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
Status: No status
Development

No branches or pull requests

1 participant