diff --git a/contrib/cont-responder/eval-responder.factor b/contrib/cont-responder/eval-responder.factor index b50e244a6b..cabd32c413 100644 --- a/contrib/cont-responder/eval-responder.factor +++ b/contrib/cont-responder/eval-responder.factor @@ -174,6 +174,8 @@ USE: sequences "eval" get ] bind ; +: >pop> dup pop* ; + : infra ( list quot -- list ) #! Call the quotation using 'list' as the datastack #! return the result datastack as a list. diff --git a/library/httpd/cont-responder.factor b/library/httpd/cont-responder.factor index dea48b2a77..7e4a1d99ea 100644 --- a/library/httpd/cont-responder.factor +++ b/library/httpd/cont-responder.factor @@ -43,14 +43,18 @@ SYMBOL: post-refresh-get? [ 32 [ 0 9 random-int CHAR: 0 + , ] times ] "" make string>number 36 >base ; +SYMBOL: table + : continuation-table ( -- ) #! Return the global table of continuations - {{ }} ; + table global hash ; : reset-continuation-table ( -- ) #! Create the initial global table continuation-table hash-clear ; +{{ }} clone table global set-hash + #! Tuple for holding data related to a continuation. TUPLE: item expire? quot id time-added ; @@ -190,7 +194,7 @@ SYMBOL: callback-cc continue ] callcc1 ( 0 [ ] == ) nip - continue + call store-callback-cc ] callcc0 ;