diff options
Diffstat (limited to 'src/wasm-module-building.h')
-rw-r--r-- | src/wasm-module-building.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wasm-module-building.h b/src/wasm-module-building.h index 6f9a58eeb..63129f874 100644 --- a/src/wasm-module-building.h +++ b/src/wasm-module-building.h @@ -169,8 +169,9 @@ public: // Add a function to the module, and to be optimized void addFunction(Function* func) { wasm->addFunction(func); - if (!useWorkers()) + if (!useWorkers()) { return; // we optimize at the end in that case + } queueFunction(func); // notify workers if needed auto notify = availableFuncs.load(); @@ -240,8 +241,9 @@ private: } } DEBUG_THREAD("joining"); - for (auto& thread : threads) + for (auto& thread : threads) { thread->join(); + } DEBUG_THREAD("joined"); } |