From 249e848dbc0e4ff5520af6ce75431bd011301531 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?= <grubba@grubba.org> Date: Fri, 27 Mar 2020 17:46:41 +0100 Subject: [PATCH] Standards.JSON: Release the interpreter lock every now and then. Fixes #10026. --- src/post_modules/JSON/json.cmod | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/post_modules/JSON/json.cmod b/src/post_modules/JSON/json.cmod index 396fca9e89..d47b5d9c1b 100644 --- a/src/post_modules/JSON/json.cmod +++ b/src/post_modules/JSON/json.cmod @@ -211,6 +211,7 @@ static void encode_mapcont_canon (struct encode_context *ctx, struct mapping *m) if (notfirst) { int indent = ctx->indent; + fast_check_threads_etc(8); string_builder_putchar (buf, ','); if (indent >= 0) { string_builder_putchar (buf, '\n'); @@ -293,6 +294,7 @@ static void json_encode_recur (struct encode_context *ctx, struct svalue *val) } json_encode_recur (ctx, ITEM (a)); for (i = 1; i < size; i++) { + fast_check_threads_etc(8); string_builder_putchar (buf, ','); if (ctx->indent >= 0) { int indent = ctx->indent; -- GitLab