From 47e96df6acb8e99cd3c5256cf9502d62d445ab26 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 12 Jul 2026 15:19:37 +0300 Subject: [PATCH] notes... Signed-off-by: Alex A. Naanou --- v3/pwiki/parser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/v3/pwiki/parser.js b/v3/pwiki/parser.js index b97cbe0..2c78e5c 100644 --- a/v3/pwiki/parser.js +++ b/v3/pwiki/parser.js @@ -648,12 +648,18 @@ module.BaseParser = { // call macro... var res = that.callMacro(page, name, args, body, state) + // async... if(res instanceof Promise){ + elem.resolving = res + let all, nested + // XXX if res is not started yet and it has not yet + // started waiting for .waitAll this can be a + // condition for a dead lock: + // res -> .waitAll -> res all = state.waitAll = Promise.all([state.waitAll, res]) - elem.resolving = res // XXX do we need to wait till the last .waitNested is // resolved? // ...should it's handlers complete??