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

proposal: wasm: Thread support #56305

Closed
mcjcloud opened this issue Oct 18, 2022 · 3 comments
Closed

proposal: wasm: Thread support #56305

mcjcloud opened this issue Oct 18, 2022 · 3 comments
Labels
arch-wasm WebAssembly issues FeatureRequest Issues asking for a new feature that does not need a proposal. FrozenDueToAge Proposal
Milestone

Comments

@mcjcloud
Copy link

Problem

Most browsers (Chrome, FF, Safari, etc.) are shipping with thread support in Wasm. See https://webassembly.org/roadmap.

Based on discussions in #28360 and #28631, this proposal aims to create progress on Wasm thread support in Go. While standardization of threads is still in Phase 2 (with a vote to move to Phase 3 happening later this month), experimental thread support will improve performance for many Go Wasm applications. Wasm is a great tool for performing computationally intensive tasks, but without thread support, it is often more performant to use JavaScript alone.

Proposal

Until standardized, thread support should exist behind the GOWASM environment variable (e.g. GOWASM=threads).

A program using go routines can be compiled using the following:

GOOS=js GOARCH=wasm GOWASM=threads go build -o out.wasm
@gopherbot gopherbot added this to the Proposal milestone Oct 18, 2022
@seankhliao seankhliao added arch-wasm WebAssembly issues FeatureRequest Issues asking for a new feature that does not need a proposal. labels Oct 18, 2022
@seankhliao
Copy link
Member

How is this issue different from #28631?

@mcjcloud
Copy link
Author

How is this issue different from #28631?

#28631 was not marked as a proposal, I figured filing specifically as a proposal may encourage more progress.

@seankhliao
Copy link
Member

A proposal isn't a way to get someone else to do the work, only to accept and approve of work that other people may do.

Duplicate of #28631

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2022
@golang golang locked and limited conversation to collaborators Oct 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly issues FeatureRequest Issues asking for a new feature that does not need a proposal. FrozenDueToAge Proposal
Projects
None yet
Development

No branches or pull requests

3 participants