-
Notifications
You must be signed in to change notification settings - Fork 23
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
Tasking #3
Comments
Some more info about how go works: |
This is solved by JuliaLang/julia#32532. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've been thinking about how to implement tasking on top of wasm. Wasm coroutines are a planned feature (https://github.com/WebAssembly/design/blob/master/FutureFeatures.md#coroutines), but no work has been done toward it, as far as I can tell. I've looked at how go implements goroutines and it looks like they're just using explicitly managed stacks in linear memory (but I'll need to look into this further). That's a bit tricky, because you you can't just push a return address onto the linear stack and jump to it. Tail calls (https://github.com/WebAssembly/tail-call/blob/master/proposals/tail-call/Overview.md) may help there, but I'm not sure they're implemented yet. We'd also need an LLVM pass that splits any function at a call boundary and turns it into push return/tail call.
The text was updated successfully, but these errors were encountered: