Skip to content

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

Open
@prattmic

Description

@prattmic

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.arch-wasmWebAssembly issuescompiler/runtimeIssues related to the Go compiler and/or runtime.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions