Show
Ignore:
Timestamp:
10/05/06 17:56:30 (2 years ago)
Author:
james
Message:

add queue freeze/thaw

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/queue.tcl

    r729 r731  
    2828#A rehash should kill the queue 
    2929set bMotion_queue [list] 
     30set bMotion_queue_runny 1 
    3031 
    3132# queue format is: 
     
    4142# 0 then it is sent to output 
    4243# This also sends stuff to remote bots 
    43 proc bMotion_queue_run { } { 
    44   global bMotion_queue 
     44proc bMotion_queue_run { {force 0} } { 
     45  global bMotion_queue bMotion_queue_runny 
     46 
     47        if {$bMotion_queue_runny == 0} { 
     48                if {$force == 0} { 
     49                        #queue is frozen 
     50                        return 0 
     51                } else { 
     52                        bMotion_putloglev d * "Running queue once while frozen" 
     53                } 
     54        } 
    4555 
    4656  set tempqueue [list] 
     
    147157} 
    148158 
     159# bMotion_queue_freeze 
     160# 
     161# Stops queue output 
     162proc bMotion_queue_freeze { } { 
     163        global bMotion_queue_runny 
     164 
     165        set bMotion_queue_runny 0 
     166        bMotion_putloglev d * "Freezing output queue" 
     167} 
     168 
     169proc bMotion_queue_thaw { } { 
     170        global bMotion_queue_runny 
     171 
     172        set bMotion_queue_runny 1 
     173        bMotion_putloglev d * "Thawing output queue" 
     174} 
     175 
    149176# init timer 
    150177utimer 1 bMotion_queue_callback