Get cont-responder contrib examples working again, and more fixes to cont-responder for continuation word
changes.cvs
parent
7decaf614e
commit
8d805d3dcb
|
@ -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.
|
||||
|
|
|
@ -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 ( -- <hashtable> )
|
||||
#! 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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue