Open issues

Make clojure.data.csv/write-csv thread-safe

Description

If clojure.data.csv/write-csv is called from multiple threads, the data gets garbled in the file, even if though we maybe using a synchronized writer. The following test will fail on the current master branch:

The problem here is because .write method on the writer is called multiple times for writing a single line to the CSV file. A potential solution for this would be to build a string for a line in the CSV file, and then call .write on the file writer only once. Attached is a patch that does this using a StringWriter in clojure.data.csv/write-csv*.

Environment

None

Status

Assignee

Unassigned

Reporter

Mourjo Sen

Labels

None

Approval

None

Patch

Code and Test

Priority

Major
Configure