The Node.js documentation makes the following comments about a Writable stream's _writev method.
The
writable._writev()method may be implemented in addition or alternatively towritable._write()in stream implementations that are capable of processing multiple chunks of data at once. If implemented and if there is buffered data from previous writes,_writev()will be called instead of_write().
Emphasis mine. In what scenarios can a Node.js writable stream have buffered data from previous writes?
Is the _writev method only called after uncorking a corked stream that's had data written to it? Or are there other scenarios where a stream can have buffered date from previous writes? Bonus point if you can point to the place in the Node.js source code where it makes a decisions w/r/t to calling _write or _writev.