dmlc / dmlc-core

A common bricks library for building scalable and portable distributed machine learning.
Apache License 2.0
865 stars 520 forks source link

[IO] Return bytes written in Stream::Write #686

Closed Lunderberg closed 6 months ago

Lunderberg commented 6 months ago

This commit updates the Stream::Write method to return the number of bytes written, analogous to the current behavior of Stream::Read. This information is necessary to correctly model partial writes to a buffered stream. (e.g. Writing to a OS pipe when the pipe's buffer is smaller than the data to be written.)