4 ms·
The example in the article creates a thread. Is that what you mean by "starting a worker"? Because it does seem to be able to do that.
by tree_of_item 8y ago
The example in the article creates a thread. Is that what you mean by "starting a worker"? Because it does seem to be able to do that.
- markdog12 8y agoJust to clarify, it creates Web Workers with JavaScript which share a WebAssembly instance. This plumbing is done automatically when compiled with Emscripten with the correct flags. You can't just take code that spawns threads, create and run a single WebAssembly instance and have it work without something like Emscripten that will do this plumbing for you. It must be done via Web Workers, which are heavyweight, so you wouldn't want to be spawning lots of them.
- deleted 8y ago[deleted]