Is Edge known to be working (or broken) with emscripten's pthreads mode?
I've got libvpx running multithreaded in ogv.js on Safari Tech Preview and
Firefox Dev Edition, but am having some trouble with Edge in the current
Windows Insider build (15048). (Have to enable 'Experimental JS features'
in about:flags to get Atomics and SharedArrayBuffer.)
It's throwing an error "SCRIPT5664: The operation is not supported on this
typed array type" in the initMainThreadBlock function from
library_pthread.js, on this line:
Atomics.store(HEAPU32, (PThread.mainThreadBlock + {{{
C_STRUCTS.pthread.tsd }}} ) >> 2, tlsMemory); // Init thread-local-storage
memory array.
As far as I can tell it should be working; HEAPU32 is a Uint32Array, its
buffer is a SharedArrayBuffer instance, and the memory locations seem in
line with what's expected.
The Atomics implementation in Edge's JS engine is at
https://github.com/Microsoft/ChakraCore/blob/master/lib/Runtime/Library/AtomicsObject.cpp
and I don't see anything obviously surprising in the source, though it
could conceivably be out of sync. Nor do I encounter the error if I just
instantiate a SharedArrayBuffer and a Uint32Array and call Atomics.store on
it.
It's possible I've broken something in my modularization fixes that doesn't
break in the other browsers...
Thanks!
-- brion
--
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].
For more options, visit https://groups.google.com/d/optout.