Method code for $scheduler.pulse()

[Turn off line numbering]
  1: var task, sub, t;
  2: 
  3: // called by $sys.heartbeat
  4: if (caller() != $sys)
  5:     throw(~perm, "Sender is not system");
  6: t = time();
  7: while (task_queue && t > task_queue[1][2]) {
  8:     task = task_queue[1];
  9:     .remove_first_task();
 10:     catch any
 11:         (> task[4].as_this_run(task[4], task[6], task[8]) <);
 12:     with
 13:         (| task[4].manager().tell_traceback(traceback()) |);
 14: }
 15: 
 16: // call sub schedulers 
 17: for sub in (sub_schedulers)
 18:     (| sub.pulse() |);

// Miroslav Silovic
// Created 05-Sep-1995 as a part of ColdCore, see: @help Credit

Tlon