Fix interactor-busy? handling

darcs
slava 2006-12-18 03:15:04 +00:00
parent c724d69d9f
commit 86d7553b9c
2 changed files with 7 additions and 4 deletions

View File

@ -27,7 +27,7 @@
- inspector where slot values can be changed - inspector where slot values can be changed
- compiled call traces: - compiled call traces:
- should be independent of whenever the runtime was built with - should be independent of whenever the runtime was built with
-fomit-frame-pointer or not (ppc and amd64) -fomit-frame-pointer on ppc
- we don't know if signal handlers run with the same stack or not - we don't know if signal handlers run with the same stack or not
- use crc32 instead of modification date in reload-modules - use crc32 instead of modification date in reload-modules
- models: don't do redundant work - models: don't do redundant work

View File

@ -32,12 +32,16 @@ M: interactor graft*
: add-interactor-history ( str interactor -- ) : add-interactor-history ( str interactor -- )
over empty? [ 2drop ] [ interactor-history push-new ] if ; over empty? [ 2drop ] [ interactor-history push-new ] if ;
: interactor-continue ( obj interactor -- )
t over set-interactor-busy?
interactor-continuation schedule-thread-with ;
: interactor-finish ( obj interactor -- ) : interactor-finish ( obj interactor -- )
[ editor-string ] keep [ editor-string ] keep
[ interactor-input. ] 2keep [ interactor-input. ] 2keep
[ add-interactor-history ] keep [ add-interactor-history ] keep
dup control-model clear-doc dup control-model clear-doc
interactor-continuation continue-with ; interactor-continue ;
: interactor-eval ( interactor -- ) : interactor-eval ( interactor -- )
[ [
@ -61,8 +65,7 @@ M: interactor stream-readln
] interactor-yield ; ] interactor-yield ;
: interactor-call ( quot interactor -- ) : interactor-call ( quot interactor -- )
2dup interactor-input. 2dup interactor-input. interactor-continue ;
interactor-continuation schedule-thread-with ;
M: interactor stream-read M: interactor stream-read
swap dup zero? swap dup zero?