Arrghh!!!

db4
Slava Pestov 2008-02-09 14:13:06 -06:00
parent 3121e740f2
commit 25c64c8ac7
1 changed files with 3 additions and 7 deletions

View File

@ -280,15 +280,11 @@ TUPLE: future value processes ;
notify-future notify-future
] 2curry spawn drop ] 2curry spawn drop
] keep ; ] keep ;
t
] compose
] spawn drop
[ self send ] compose spawn ;
: ?future ( future -- result ) : ?future ( future -- result )
#! Block the process until the future has completed and then #! Block the process until the future has completed and then
#! place the result on the stack. Return the result #! place the result on the stack. Return the result
#! immediately if the future has completed. #! immediately if the future has completed.
dup future-value [ dup future-value [
first2 [ throw ] unless first2 [ throw ] unless
] [ ] [