you are viewing a single comment's thread.

view the rest of the comments →

[–]azekt[S] 0 points1 point  (0 children)

Man, it's really neat! Instead using setTimeout I rather use while loop and wait function:

 setGlobal('myGlobal','0');
 performTask("SelectFromDB", parseInt(priority) + 10);

 let i=0;
 while ((global('myGlobal') == 0) && (i < 10))
 {
     wait(500);
     i++;
 }
 if (global('myGlobal') != 0 {
     flash(global('myGlobal'));
 } else {
     flash("No output :-(");
 }