Whoops, forgot my sample URL to reproduce: https://brionv.com/misc/ogv.js/demo-mt/#file=Knowledge_for_Everyone_(short_cut).webm&player=js-mt&size=480p.vp9.webm&source=shortlist-vp9
(Only the VP9 decoder has the multithread mode and I'm seeing good results, though it currently blocks the main thread during decoding I can easily fix that. And it's a little... hang-y sometimes, possibly due to not waiting on thread creation if the thread pool fills up.) -- brion On Thu, Mar 9, 2017 at 7:29 PM, Brion Vibber <[email protected]> wrote: > 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.
