The current documentation says:
Writer — access stream.writer to push data incrementally. The writer exposes synchronous methods (writeSync(), writevSync(), endSync()) that return immediately, as well as async equivalents (write(), writev(), end()) that wait for drain when backpressured.
The async variant behaves currently like a push source in strict mode see https://github.com/WinterTC55/iter-streams/blob/main/docs/DESIGN.md#4-push-stream .
So it rejects if the flow control buffer is full.
Maybe this is the desired behavior.
I think this should be stated in documentation. Together with an example, how one want to check if the buffer is full.
Alternatively, a behavior, such as block, may be considered as an option.
That is only a tiny issue, I was wondering.
@jasnell
The current documentation says:
The async variant behaves currently like a push source in
strictmode see https://github.com/WinterTC55/iter-streams/blob/main/docs/DESIGN.md#4-push-stream .So it rejects if the flow control buffer is full.
Maybe this is the desired behavior.
I think this should be stated in documentation. Together with an example, how one want to check if the buffer is full.
Alternatively, a behavior, such as
block,may be considered as an option.That is only a tiny issue, I was wondering.
@jasnell