Hi,
Is there any support planned for something like 'fibers' in WebAssembly?
Basically, this is just super simple cooperative threading that allows you to do (a form of) async programming. The Windows API supports fibers via CreateFiber and SwitchToFiber (and that's about the whole API) No other OS's do I think (although they apparently used to via 'contexts').
The language I am writing that transpiles to c++ supports fibers thanks to the boost.coroutine package. This contains equivalent versions of CreateFiber and SwitchToFiber for a ton of OS's (written in ASM of course), including windows, linux, macos, android, ios. It works great and I don't actually even use the coroutine stuff.
You can do some cool stuff on top of fibers - boost.coroutine does coroutines (generators?) in pure c++ on top of them, and there is even a proposal around for c# style async/await etc in c++ using fibers.
I haven't had a whole lot of experience with this stuff, but I find fibers incredibly useful, super simple and think they would be a very cool addition to WASM. Especially, of course, for my needs so yes, there's a bit of self interest here...
Dunno, this is probably not the right place to be mentioning it, but I just wondered if anyone knew whether something like this is happening?
And if not here, where should I be asking questions like this?
Bye!
Mark