X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fprocesses%2Fprocess_manager.sh;fp=scripts%2Fprocesses%2Fprocess_manager.sh;h=48737e471867db33d80ed39a482a704f0ac03b59;hb=7b39f7e279005c8466ef508220a532ce2aa4abf8;hp=31049f5e99844c2fe011af2822914833d53828a6;hpb=3fbd372b35b15a19fb171d5ae34294ff7b1e6485;p=feisty_meow.git diff --git a/scripts/processes/process_manager.sh b/scripts/processes/process_manager.sh index 31049f5e..48737e47 100644 --- a/scripts/processes/process_manager.sh +++ b/scripts/processes/process_manager.sh @@ -80,10 +80,16 @@ function wait_on_backgrounders() echo "done waiting, background process count is down to $bg_count." } +#hmmm: the demo app here raises some concerns--how do we know the bg count is right? +# what if something died and we didn't check it? +# will the thing that looks at bg count adjust it if there are actually no waiting processes? + # happily launches off different actions as background processes. launcher_demonstrator() { - while true; do + # run a limited number of loops, since we don't want to do this forever. + local loops=50 + while ((loops-- > 0)); do # pick a thing to do. which=$(($RANDOM % 3)) #hmmm: not asynch yet! make it so!