Implement the full behavior of withReadableRange; close #12
This commit is contained in:
parent
d3ef34b325
commit
442ad53b00
4 changed files with 160 additions and 121 deletions
|
|
@ -172,8 +172,9 @@ func pipeInput*(source: InputStream,
|
|||
func pipeInput*(buffers: PageBuffers,
|
||||
allowWaitFor = false,
|
||||
source: InputStream = nil): AsyncInputStream =
|
||||
var spanEndPos = Natural 0
|
||||
var span = if buffers.len == 0: default(PageSpan)
|
||||
else: obtainReadableSpan buffers.queue[0]
|
||||
else: buffers.obtainReadableSpan(spanEndPos)
|
||||
|
||||
AsyncInputStream LayeredInputStream(
|
||||
vtable: vtableAddr pipeInputVTable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue