diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-29 06:26:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-29 06:26:18 -0700 |
commit | d651ee10089e684686d9255e6f479fa16c7576db (patch) | |
tree | 8fef531646df6e6b87fb4432753f82d646b64436 /txr.1 | |
parent | a5ef086fc33cfbfce7b03bad291efa28acf739b2 (diff) | |
download | txr-d651ee10089e684686d9255e6f479fa16c7576db.tar.gz txr-d651ee10089e684686d9255e6f479fa16c7576db.tar.bz2 txr-d651ee10089e684686d9255e6f479fa16c7576db.zip |
Unwinding continuations via "poison" value.
* unwind.c (sys_cont_poison_s): New symbol variable.
(revive_cont): If the argument is the poison symbol, then
unwind through the continuation all the way back to
revive_cont's own block, instead of to the continuation's very
top block. Thus the continuation is not restarted but
completely unwound.
(uw_late_init): Initialize sys_cont_poison_s.
* txr.1: Documented sys:cont-poison.
Diffstat (limited to 'txr.1')
-rw-r--r-- | txr.1 | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -27512,6 +27512,14 @@ delimiting block named by then the result value of that block will appear as the return value of the continuation function. +If the symbol +.code sys:cont-poison +is passed to the continuation function, the continuation will be +resumed in a different manner: its context will be restored as in the +ordinary resume case, whereupon it will be immediately abandoned by +a nonlocal exit, causing unwinding to take place across all of the +evaluation's continuation frames. + .TP* Note: The continuation function may be used any time after it is produced, and may be |