io: streamline bytes output port
This commit is contained in:
parent
0e6c441f37
commit
94a4f6d703
|
@ -180,7 +180,9 @@
|
|||
(pipe-discard-all o))))
|
||||
#:self o
|
||||
#:evt o
|
||||
#:write-out o
|
||||
#:write-out
|
||||
(lambda (o src-bstr src-start src-end nonblock? enable-break? copy?)
|
||||
((core-output-port-write-out o) (core-port-self o) src-bstr src-start src-end nonblock? enable-break? copy?))
|
||||
#:close
|
||||
(lambda (o) ((core-port-close o) (core-port-self o)))
|
||||
#:get-write-evt
|
||||
|
|
|
@ -33,6 +33,10 @@
|
|||
(if zero-ok?
|
||||
0
|
||||
(try-again out extra-count-outs))]
|
||||
[(exact-positive-integer? v)
|
||||
(port-count-all! out extra-count-outs v bstr start)
|
||||
(end-atomic)
|
||||
v]
|
||||
[(evt? v)
|
||||
(end-atomic)
|
||||
(cond
|
||||
|
@ -43,10 +47,6 @@
|
|||
(sync v)))
|
||||
(start-atomic)
|
||||
(result-loop new-v)])]
|
||||
[(exact-positive-integer? v)
|
||||
(port-count-all! out extra-count-outs v bstr start)
|
||||
(end-atomic)
|
||||
v]
|
||||
[else
|
||||
(end-atomic)
|
||||
(internal-error (format "write-some-bytes: weird result ~s for ~s ~s ~s at ~s" v bstr start end out))]))]
|
||||
|
|
Loading…
Reference in New Issue
Block a user