X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fprocesses%2Fprocess_manager.sh;h=48737e471867db33d80ed39a482a704f0ac03b59;hb=a4c99c6006b3aa20b5f65f02c2d30db7e790083a;hp=31049f5e99844c2fe011af2822914833d53828a6;hpb=16afe4d6569a92127a4f27dfb36e0acc1889b392;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!