I/O fixes
parent
f0ae853bca
commit
7f79de6d1f
|
@ -2,6 +2,8 @@ should fix in 0.82:
|
|||
|
||||
- constant branch folding
|
||||
- getenv, setenv, fast-slot stuff
|
||||
- more flexible fixnum intrinsics
|
||||
- compile if-intrinsic even if there is no #if there
|
||||
- 3 >n fep
|
||||
- amd64 %box-struct
|
||||
- get factor running on mac intel
|
||||
|
|
|
@ -136,17 +136,6 @@ TUPLE: resume value stdio ;
|
|||
</body>
|
||||
</html> flush ;
|
||||
|
||||
: (expired-page-handler) ( alist -- )
|
||||
#! Display a page has expired message.
|
||||
#! TODO: Need to handle this better to enable
|
||||
#! returning back to root continuation.
|
||||
drop
|
||||
<html>
|
||||
<body>
|
||||
<p> "This page has expired." write </p>
|
||||
</body>
|
||||
</html> flush ;
|
||||
|
||||
: expired-page-handler ( alist -- )
|
||||
[ (expired-page-handler) ] show-final ;
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ C: port ( handle buffer -- port )
|
|||
80 <sbuf> over set-port-sbuf ;
|
||||
|
||||
: touch-port ( port -- )
|
||||
dup port-timeout dup 0 =
|
||||
dup port-timeout dup zero?
|
||||
[ 2drop ] [ millis + swap set-port-cutoff ] if ;
|
||||
|
||||
M: port set-timeout ( timeout port -- )
|
||||
|
@ -115,11 +115,8 @@ GENERIC: task-container ( task -- vector )
|
|||
queue-empty? [ remove-io-task ] [ drop ] if r> ;
|
||||
|
||||
: handle-fd ( task -- )
|
||||
dup do-io-task [
|
||||
dup io-task-port touch-port pop-callback continue
|
||||
] [
|
||||
drop
|
||||
] if ;
|
||||
dup io-task-port touch-port dup do-io-task
|
||||
[ pop-callback continue ] [ drop ] if ;
|
||||
|
||||
: timeout? ( port -- ? )
|
||||
port-cutoff dup zero? not swap millis < and ;
|
||||
|
@ -145,7 +142,7 @@ GENERIC: task-container ( task -- vector )
|
|||
f ;
|
||||
|
||||
: io-multiplex ( timeout -- )
|
||||
>r FD_SETSIZE init-fdsets r> make-timeval select ( io-error ) drop
|
||||
>r FD_SETSIZE init-fdsets r> make-timeval select io-error
|
||||
read-fdset get read-tasks get handle-fdset
|
||||
write-fdset get write-tasks get handle-fdset ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue