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) original commit: a12f77f36e5e88d55ebdde0a8ec6e4a6ca708394
This commit is contained in:
parent
5fdcd73a84
commit
6249eaa3fe
|
@ -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))]
|
(cond
|
||||||
|
[(channel? return-evt/to-insert-chan)
|
||||||
|
(cons viable-bytes (loop next-remaining-queue))]
|
||||||
|
[else
|
||||||
|
(define c (make-channel))
|
||||||
|
(queue-insertion viable-bytes c)
|
||||||
|
(channel-put c #f)
|
||||||
|
(loop next-remaining-queue)])]
|
||||||
[else
|
[else
|
||||||
(set! remaining-queue next-remaining-queue)
|
(set! remaining-queue next-remaining-queue)
|
||||||
(list viable-bytes)])))
|
(cond
|
||||||
(cond
|
[(channel? return-evt/to-insert-chan)
|
||||||
[(channel? return-evt/to-insert-chan)
|
(list viable-bytes)]
|
||||||
(channel-put return-evt/to-insert-chan viable-bytess)]
|
[else
|
||||||
[else
|
(queue-insertion viable-bytes return-evt/to-insert-chan)
|
||||||
(let loop ([viable-bytess viable-bytess])
|
#f])])))
|
||||||
(cond
|
(when (channel? return-evt/to-insert-chan)
|
||||||
[(null? (cdr viable-bytess))
|
(channel-put return-evt/to-insert-chan viable-bytess))
|
||||||
(queue-insertion (car viable-bytess) return-evt/to-insert-chan)]
|
|
||||||
[else
|
|
||||||
(queue-insertion (car viable-bytess) always-evt)
|
|
||||||
(loop (cdr 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