Hi,

 It looks like recent versions of V8's JS shell support web workers, so it 
is possible to run emscripten+pthreads in this shell. This is useful for 
running test suites which
use threads as it requires less work than running in the browser.

Ran into the following problems:
- the message received by onmessage () is not wrapped in a 'data' property. 
This might be a bug in D8.
- the main threads onmessage () seems to be only called when control 
returns to the main loop which never seems to happen in the JS shell, so 
the 'loaded' message
  is never received by the main thread, so startup fails. Worked around it 
by receiving the message synchronously using worker.getMessage () and 
passing it to
  onmessage (). Couldn't find too much documentation on getMessage (), is 
it a V8 extension ?

Here is a commit with the changes:
https://github.com/vargaz/emscripten/commit/99e8ab6fb5e2a46a880aebe30014f6065b1c1b35

Wanted to discuss these isues before making it into a PR.

                    Zoltan


-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/95c693a4-7d24-4e40-9bff-7ea1e960daa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to