[jira] [Commented] (CSV-143) CSVPrinter ill-suited in multithreaded environment
[ https://issues.apache.org/jira/browse/CSV-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504784#comment-17504784 ] Andras Sereny commented on CSV-143: --- Thanks a lot for the fix Gary. Really sorry about it, but I have no way to run that use case anymore. > CSVPrinter ill-suited in multithreaded environment > -- > > Key: CSV-143 > URL: https://issues.apache.org/jira/browse/CSV-143 > Project: Commons CSV > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Andras Sereny >Priority: Major > Fix For: 1.10.0 > > > CSVPrinter doesn't support multiple threads writing to the same appendable. > The class itself is not thread safe and, what's worse, it also invalidates > any thread-safety guarantees provided by the underlying appendable, as in one > CSVPrinter.print method there are multiple calls to out.append. > OpenCSV does better here: in CSVWriter.writeNext there is one single call to > PrintWriter.writer, thus it conveniently propagates PrintWriter thread-safety. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Commented] (CSV-143) CSVPrinter ill-suited in multithreaded environment
[ https://issues.apache.org/jira/browse/CSV-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15106190#comment-15106190 ] Gary Gregory commented on CSV-143: -- In order call the Appendable once, we'd need to buffer our writes to a buffer, which would be slower and fatter. I still could see a subclass specializing in a thread-safe implementation. Patches welcome. > CSVPrinter ill-suited in multithreaded environment > -- > > Key: CSV-143 > URL: https://issues.apache.org/jira/browse/CSV-143 > Project: Commons CSV > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Andras Sereny > > CSVPrinter doesn't support multiple threads writing to the same appendable. > The class itself is not thread safe and, what's worse, it also invalidates > any thread-safety guarantees provided by the underlying appendable, as in one > CSVPrinter.print method there are multiple calls to out.append. > OpenCSV does better here: in CSVWriter.writeNext there is one single call to > PrintWriter.writer, thus it conveniently propagates PrintWriter thread-safety. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CSV-143) CSVPrinter ill-suited in multithreaded environment
[ https://issues.apache.org/jira/browse/CSV-143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14206378#comment-14206378 ] Gary Gregory commented on CSV-143: -- Patches welcome! :-) If your changes cannot keep binary compatibility, consider a new class or a subclass. > CSVPrinter ill-suited in multithreaded environment > -- > > Key: CSV-143 > URL: https://issues.apache.org/jira/browse/CSV-143 > Project: Commons CSV > Issue Type: Improvement >Affects Versions: 1.0 >Reporter: Andras Sereny > > CSVPrinter doesn't support multiple threads writing to the same appendable. > The class itself is not thread safe and, what's worse, it also invalidates > any thread-safety guarantees provided by the underlying appendable, as in one > CSVPrinter.print method there are multiple calls to out.append. > OpenCSV does better here: in CSVWriter.writeNext there is one single call to > PrintWriter.writer, thus it conveniently propagates PrintWriter thread-safety. -- This message was sent by Atlassian JIRA (v6.3.4#6332)