From aa4bb572edd85ef7249270df695332f3a450dca8 Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Thu, 19 Dec 2024 21:47:00 +0800 Subject: [PATCH] Parallelism workaround for web build via Emscripten. --- src/n8/ast/expression/ParallelExpression.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/n8/ast/expression/ParallelExpression.cpp b/src/n8/ast/expression/ParallelExpression.cpp index 77f06ab..1af3d36 100644 --- a/src/n8/ast/expression/ParallelExpression.cpp +++ b/src/n8/ast/expression/ParallelExpression.cpp @@ -34,6 +34,8 @@ #include DynamicObject ParallelExpression::visit(SymbolTable& symbols) { + #ifndef __EMSCRIPTEN__ + std::thread task( std::bind([ expr = std::move(this->expression), @@ -137,5 +139,12 @@ DynamicObject ParallelExpression::visit(SymbolTable& symbols) { ); symbols.addParallelism(std::move(task)); + + #else + + this->expression->visit(symbols); + + #endif + return {}; }