MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / runIfMainThread

Function runIfMainThread

src/parseTools.mjs:904–910  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

902}
903
904export function runIfMainThread(text) {
905 if (WASM_WORKERS || PTHREADS) {
906 return `if (${ENVIRONMENT_IS_MAIN_THREAD()}) { ${text} }`;
907 } else {
908 return text;
909 }
910}
911
912function runIfWorkerThread(text) {
913 if (WASM_WORKERS || PTHREADS) {

Callers 1

shell_minimal.jsFile · 0.85

Calls 1

Tested by

no test coverage detected