adjust changes in 8027e48
so that we see intermediate
output during flushes instead of collecting the entire contents of the buffer before flushing (at least in the more common case)
This commit is contained in:
parent
0083f1c9ae
commit
a12f77f36e
|
@ -2647,21 +2647,24 @@
|
||||||
(split-queue converter q))
|
(split-queue converter q))
|
||||||
(cond
|
(cond
|
||||||
[flush-keep-trying?
|
[flush-keep-trying?
|
||||||
(cons viable-bytes (loop next-remaining-queue))]
|
|
||||||
[else
|
|
||||||
(set! remaining-queue next-remaining-queue)
|
|
||||||
(list viable-bytes)])))
|
|
||||||
(cond
|
(cond
|
||||||
[(channel? return-evt/to-insert-chan)
|
[(channel? return-evt/to-insert-chan)
|
||||||
(channel-put return-evt/to-insert-chan viable-bytess)]
|
(cons viable-bytes (loop next-remaining-queue))]
|
||||||
[else
|
[else
|
||||||
(let loop ([viable-bytess viable-bytess])
|
(define c (make-channel))
|
||||||
|
(queue-insertion viable-bytes c)
|
||||||
|
(channel-put c #f)
|
||||||
|
(loop next-remaining-queue)])]
|
||||||
|
[else
|
||||||
|
(set! remaining-queue next-remaining-queue)
|
||||||
(cond
|
(cond
|
||||||
[(null? (cdr viable-bytess))
|
[(channel? return-evt/to-insert-chan)
|
||||||
(queue-insertion (car viable-bytess) return-evt/to-insert-chan)]
|
(list viable-bytes)]
|
||||||
[else
|
[else
|
||||||
(queue-insertion (car viable-bytess) always-evt)
|
(queue-insertion viable-bytes return-evt/to-insert-chan)
|
||||||
(loop (cdr viable-bytess))]))])
|
#f])])))
|
||||||
|
(when (channel? return-evt/to-insert-chan)
|
||||||
|
(channel-put return-evt/to-insert-chan viable-bytess))
|
||||||
(loop remaining-queue (current-inexact-milliseconds))))
|
(loop remaining-queue (current-inexact-milliseconds))))
|
||||||
(handle-evt
|
(handle-evt
|
||||||
clear-output-chan
|
clear-output-chan
|
||||||
|
|
Loading…
Reference in New Issue
Block a user