From 8820613fda1928b60bebeb9e5bd83d50c4302821 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 12 Jan 2021 04:41:49 +0300 Subject: [PATCH] more notes.... Signed-off-by: Alex A. Naanou --- Viewer/features/core.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Viewer/features/core.js b/Viewer/features/core.js index 8b37e984..3b46ea19 100755 --- a/Viewer/features/core.js +++ b/Viewer/features/core.js @@ -2712,7 +2712,19 @@ function(title, func){ // XXX might be a good idea to split this into a generic and domain parts // and move the generic part into types/runner... // XXX check if item is already in queue... -// XXX BUG! +// XXX BUG when this is called multiple times each thread is called from +// top to bottom even when consolidating the results into a single +// pack, e.g. for: +// [1,2,3].map(e => ig.exampleChainedQueueHandler(e)) +// the .exampleChainedQueueHandler(..) is called once per input and: +// - pre-prep is called once per input +// - prep is called once per input +// - action is called once per input +// ...and since the inputs are already consolidated into a +// single container this will be called on that container +// once per input -> each input is processed N times... +// ...would either need to "consume" the inputs removing them from +// the input list or keep track of what we are calling... var queueHandler = module.queueHandler = function(title, func){ @@ -2806,7 +2818,7 @@ function(title, func){ handler: func, toString: function(){ - // XXX add opts of given... + // XXX add opts if given... return `core.queueHandler('${action.name}',\n${ (arg_handler ? object.normalizeIndent('\t'+arg_handler.toString()).indent('\t') + ',\n'