Protect json import with mutex

Signed-off-by: Jasper Homann <jasper.homann@tu-braunschweig.de>
This commit is contained in:
Jasper Homann 2026-08-07 12:28:24 +02:00 committed by myrtle
parent d3bbf4dc6e
commit 9a4652e0f8
1 changed files with 3 additions and 0 deletions

View File

@ -132,6 +132,9 @@ template <typename FrontendType> struct GenericFrontend
m.is_toplevel = true;
m.prefix = "";
m.path = top;
std::lock_guard<std::mutex> lock(ctx->mutex);
ctx->top_module = top;
// Do the actual import, starting from the top level module
import_module(m, top.str(ctx), top.str(ctx), mod_refs.at(top.str(ctx)));