You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To actually flush data to the writer, Csv.Writer.Output::flush must be called. But this is only called when the buffer is full, or the output is closed. In particular, Csv.Writer::flush does not call it.
I would also expect this to pass if the StringWriter was wrapped in a BufferedWriter with a very large buffer. That is, Csv.Writer::flush should call Writer::flush, not just write the contents of the internal buffer.
I have a long-running process which slowly writes to a CSV-formatted file. That file is consumed by other processes. It would be very useful to be able to ensure that lines are actually written to the file long before it is closed.
The workaround is to use a disposable Csv.Writer for each line - closing it at the end of the line flushes the buffer.
The text was updated successfully, but these errors were encountered:
I would expect this test to pass:
But it does not.
To actually flush data to the writer, Csv.Writer.Output::flush must be called. But this is only called when the buffer is full, or the output is closed. In particular, Csv.Writer::flush does not call it.
I would also expect this to pass if the StringWriter was wrapped in a BufferedWriter with a very large buffer. That is, Csv.Writer::flush should call Writer::flush, not just write the contents of the internal buffer.
I have a long-running process which slowly writes to a CSV-formatted file. That file is consumed by other processes. It would be very useful to be able to ensure that lines are actually written to the file long before it is closed.
The workaround is to use a disposable Csv.Writer for each line - closing it at the end of the line flushes the buffer.
The text was updated successfully, but these errors were encountered: