Hi, 

I am trying to benchmark the effects of modifications to various parts of 
the WASM toolchain. But when running multithreaded emscripten output in d8 
I get the error:

Aborted(Assertion failed: Pthreads do not work in this environment yet 
(need Web Workers, or an alternative to them))
test.js:731: RuntimeError: Aborted(Assertion failed: Pthreads do not work 
in this environment yet (need Web Workers, or an alternative to them))
  throw e;

The error comes from this line:

assert(
  ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER || ENVIRONMENT_IS_NODE, 
'Pthreads do not work in this environment yet (need Web Workers, or an 
alternative to them)');

Anyone know how to get around this? d8 is capable of running web workers, 
so there's no technical limitation on it. 

This is how I compiled my cpp code

em++ -sENVIRONMENT=shell,worker -s ASSERTIONS=2 -s PTHREAD_POOL_SIZE=4 -s 
WASM=1 -pthread test.cpp -o test.js

-- 
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 visit 
https://groups.google.com/d/msgid/emscripten-discuss/2e776c13-a1bb-4479-9091-b62ebc49e22bn%40googlegroups.com.

Reply via email to