I've noticed that Safari Technical Preview has SharedArrayBuffer support,
which drove me to start testing the USE_PTHREADS mode in the hopes that
it'll make it to a release browser version eventually. :)

In my ogv.js video player I use emscripten's MODULARIZE and EXPORT_NAME
options to build the various demuxer and decoder programs as separate
instantiable object classes. I can't use a single global easily, as there
may be multiple player instances living in the page, with different
lifetimes, different formats, and separate state.

Currently pthreads-main.js assumes that it can dig into both the Module
object and various internal state variables directly as globals; this fails
when using the modularize mode, since the scope is different and nothing
actually gets instantiated unless the wrapper constructor is called. The
main thread also fails to detect its script URL correctly, trying to access
document.currentScript after script parsing/execution is complete.

I've got a PR against the incoming branch which I've tested lightly, but
seems to do the job: https://github.com/kripken/emscripten/pull/5016

-- 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.

Reply via email to