Streaming File Output in libuv
As you saw in the last two chapters, output in libuv works differently than input. Where input events originate from outside our program, and can happen at any time and in any number, output always initiates from our own code. Although this slightly complicates our implementation, the good news is that we won’t need to introduce any new library or system calls. But we will want to think hard about the consequences of our design for performance.
Streaming Output and Performance
Consider the cases where input and output run at different rates. If a standard input produces data more slowly than standard output has the capacity to receive it, there’s no problem; output is perfectly happy to run below peak capacity. ...
Get Modern Systems Programming with Scala Native now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.