Commits

Wes McKinney authored 2821030124e
ARROW-508: [C++] Add basic threadsafety to normal files and memory maps This patch is stacked on ARROW-494, so will need to be rebased. * Since the naive `ReadAt` implementation involves a Seek and a Read, this locks until the read is completed. * Normal file reads block until completion * File writes block until completion This covers the threadsafety requirements for parquet-cpp at least. For on-disk files, the following methods are now threadsafe: * `ArrowInputFile::Read` and `ArrowInputFile::ReadAt` * `ArrowOutputStream::Write` parquet-cpp calls `Seek` in a couple places: https://github.com/apache/parquet-cpp/blob/master/src/parquet/file/reader-internal.cc#L257 Strictly speaking, if two threads are trying to read the same file from the same input source, this could have a race condition in esoteric circumstances. I'm going to report a bug to change these to `ReadAt` which can be more easily made threadsafe Author: Wes McKinney <wes.mckinney@twosigma.com> Closes #300 from wesm/ARROW-508 and squashes the following commits: e57156c [Wes McKinney] Make base ReadableFileInterface::ReadAt and some file functions threadsafe