Open axman6 opened 4 years ago
It's honestly been so long since I wrote this that I don't remember. From the code and comments, it looks like it's designed to handle a very specific kind of inefficiency we were running into at the time, and may in fact not stream the output as you're anticipating.
It looks like I'm probably wrong about the behaviour of the function, I'd missed how yieldS interacted with onAwait.
I received a PR recently which used
vectorBuilder
to produce ByteStrings (via conversion from unboxed vectors). I was surprised when I looked at the source code that it does not produce vectors lazily, and instead produces the list of vectors and yields them all once the conduit has finished. Is this expected behaviour? It's certainly surprising to me given its type!