Engine (computer science)

From Wikipedia, the free encyclopedia

An engine is a continuation-based construct that provides timed preemption. Engines which can contain other engines are sometimes called nesters and engines which don't have this ability are then called flat engines. To implement timed preemption there needs to be a clock. This clock can measure real time or simulated time. Simulated time can be implemented in a language like scheme, by making each function start with decrementing the clock.

(define-syntax timed-lambda
  (syntax-rules ()
    ((_ formals exp1 exp2 ...)
     (lambda formals (decrement-timer) exp1 exp2 ...))))

[edit] External links