unless code gets loaded via WorkerGlobalScope.importScripts (as is e.g.
> All internal code such as EM_ASM and js-library functions all run in the
> module scope so have access to all the module instance internals
> already. Anything you would access have `MyModule.foo` can be accessed
> simply via `foo` in internal code (this goes for single threaded code too).
>
> cheers,
> sam
>
> On Thu, Jul 17, 2025 at 7:37 AM Stephan Bergmann <
sber...@gmail.com
> <mailto:
sber...@gmail.com>> wrote:
>
> When I use -sMODULARIZE and -pthread, code gets generated into the *.js
> file so that the pthread workers do
>
> > isPthread && Module();
>
> (where the Module() invocation returns a promise that resolves to a
> module instance). But that module instance is effectively "lost",
> or is
> there some way for me to obtain it? (Other than using sed on the
> generated *.js to make that line instead read
>
> > isPthread && createOnlineModule().then(module => ...);
>
> and capture the instance.)
>
> --
> 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
emscripten-disc...@googlegroups.com