Tcl Library Source Code

Check-in [49c233e480]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Workarounds for malformed tasks
Timelines: family | ancestors | descendants | both | odie
Files: files | file ages | folders
SHA1: 49c233e4809c094875a126f5e32759181e4cc18d
User & Date: tne 2016-10-12 19:05:55
Context
2016-10-17
14:13
Fixed indentation in the source code. No functional changes check-in: dee02101fb user: tne tags: odie
2016-10-12
19:05
Workarounds for malformed tasks check-in: 49c233e480 user: tne tags: odie
2016-09-29
19:33
Pulling changes from trunk check-in: ad4505297c user: tne tags: odie
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/cron/cron.tcl.

359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
        }
        continue
      }
      if {$::cron::trace > 2} {
        puts [list RUNNING $task [task info $task]]
      }
      dict set processTable($task) running 1
      set coro [dict get $processTable($task) coroutine]
      set command [dict get $processTable($task) command]
      if {$command eq {} && $coro eq {}} {
        # Task has nothing to do. Slot it for destruction
        lappend cancellist $task
      } elseif {$coro ne {}} {
        if {[info command $coro] eq {}} {
          set object [dict get $processTable($task) object]
          # Trigger coroutine again if a command was given







|
|







359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
        }
        continue
      }
      if {$::cron::trace > 2} {
        puts [list RUNNING $task [task info $task]]
      }
      dict set processTable($task) running 1
      set coro [dict getnull $processTable($task) coroutine]
      set command [dict getnull $processTable($task) command]
      if {$command eq {} && $coro eq {}} {
        # Task has nothing to do. Slot it for destruction
        lappend cancellist $task
      } elseif {$coro ne {}} {
        if {[info command $coro] eq {}} {
          set object [dict get $processTable($task) object]
          # Trigger coroutine again if a command was given
429
430
431
432
433
434
435


436
437
438
439
440
441
442
      }
      dict set processTable($task) running 0
    }
    foreach {task} $cancellist {
      unset -nocomplain processTable($task)
    }
    foreach {process} [lsort -dictionary [array names processTable]] {


      dict with processTable($process) {
        if {$scheduled==0 && $frequency==0} {
          if {$next_idle_event < $nextevent} {
            set nexttask $task
            set nextevent $next_idle_event
          }
        } elseif {$scheduled < $nextevent} {







>
>







429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
      }
      dict set processTable($task) running 0
    }
    foreach {task} $cancellist {
      unset -nocomplain processTable($task)
    }
    foreach {process} [lsort -dictionary [array names processTable]] {
      set scheduled 0
      set frequency 0
      dict with processTable($process) {
        if {$scheduled==0 && $frequency==0} {
          if {$next_idle_event < $nextevent} {
            set nexttask $task
            set nextevent $next_idle_event
          }
        } elseif {$scheduled < $nextevent} {