Changeset 34553 in project


Ignore:
Timestamp:
09/14/17 21:42:35 (5 weeks ago)
Author:
sjamaan
Message:

suspension: Now that evil is kept at bay by restoration of the seals once more (for as long as it will last), fix a more benign bug due to the destruction of ##sys#direct-return in the battle

Location:
release/4/suspension/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/suspension/trunk/suspension.scm

    r19438 r34553  
    66                    continuation-suspend
    77                    continuation-resume)
    8   (import scheme chicken ports)
     8  (import scheme chicken ports foreign)
    99
    1010(use srfi-18 s11n)
     
    5454         continuation-drop) ) ) ) ) )
    5555
     56(define direct-return
     57  (foreign-lambda* void ((scheme-object dk) (scheme-object x))
     58    "C_kontinue(dk, x);"))
     59
    5660(define (continuation-resume k . results)
    57   (##sys#direct-return (with-input-from-string k deserialize) results) )
     61  (direct-return (with-input-from-string k deserialize) results) )
    5862
    5963)
  • release/4/suspension/trunk/tests/simple-test.scm

    r29855 r34553  
    55(let ((args (command-line-arguments)))
    66  (cond ((member "store" args)
    7          (print "saving ...")
    87         (with-limited-continuation
    98          (lambda ()
    109            (let ((r (continuation-suspend
    1110                      (lambda (k)
     11                        (print "saving ...")
    1212                        (with-output-to-file "k.data" (cut display k))))))
    1313              (print "reenter: " r)
     
    1717         (continuation-resume
    1818          (with-input-from-file "k.data" read-string)
    19           #f))
     19          123))
    2020        (else (print "load or store?"))))
Note: See TracChangeset for help on using the changeset viewer.