Engine (computer science)
Encyclopedia
An engine is a continuation
Continuation
In computer science and programming, a continuation is an abstract representation of the control state of a computer program. A continuation reifies the program control state, i.e...

-based construct that provides timed preemption
Preemption (computing)
In computing, preemption is the act of temporarily interrupting a task being carried out by a computer system, without requiring its cooperation, and with the intention of resuming the task at a later time. Such a change is known as a context switch...

. Engines which can contain other engines are sometimes called nesters and engines which don't have this ability are then called flat engines or "solo 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 ...))))

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK