First page Back Continue Last page Overview Image
8.6 Control Structures – NRE
Miguel’s NRE (Non-Recursive Engine) – Decouples Tcl and C stacks from each other. Enables:
[328][396] coroutine, yield, yieldto
Coroutine – Separate call stack. Invocation continues execution after the last yield-point. Initially from the beginning. Returning from the procedure without yield ends the coroutine.
Stack level #1 is the scope for coroutine-global variables.
Use [info coroutine] as callback to reschedule after yielding.