io.ports: speed up stream-flush.

db4
John Benediktsson 2013-09-18 19:27:40 -07:00
parent fb63772e9d
commit 602e0aab94
1 changed files with 2 additions and 2 deletions
basis/io/ports

View File

@ -127,7 +127,7 @@ M: output-port stream-write1
: write-in-groups ( byte-array port -- )
[ binary-object uchar <c-direct-array> ] dip
[ buffer>> size>> <groups> ] [ '[ _ stream-write ] ] bi
each ;
each ; inline
M: output-port stream-write
dup check-disposed
@ -142,7 +142,7 @@ HOOK: (wait-to-write) io-backend ( port -- )
: port-flush ( port -- )
dup buffer>> buffer-empty?
[ drop ] [ dup (wait-to-write) port-flush ] if ;
[ drop ] [ dup (wait-to-write) port-flush ] if ; inline recursive
M: output-port stream-flush
[ check-disposed ] [ port-flush ] bi ;