scheduler endcase - part-cw/lambdanative GitHub Wiki

(scheduler-endcase store)

scheduler-endcase marks the end of a patient case

Parameter Description
store Data store name

Example

Example 1: From the main loop of a distributed monitoring application, which exchanges data using fifo's. Here the main application notifies the other monitoring applications to start or end cases by setting the "CaseStartPending" and "CaseEndPending" variables respectively.

(lambda (t x y)
  (if (store-ref store "CaseStartPending" #f) 
    (begin (scheduler-startcase store (store-ref store "CaseStartPending" #f))
    (store-set! store "CaseStartPending" #f)))
  (if (store-ref store "CaseEndPending" #f) 
    (begin (scheduler-endcase store) (store-set! store "CaseEndPending" #f)))
  (log-rollcase store)
  (scheduler-iterate)
  (thread-sleep! 0.05)
)