[PATCH] D78897: [Support] raw_fd_ostream can lock file before write
Serge Pavlov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 26 23:57:10 PDT 2020
sepavloff created this revision.
sepavloff added reviewers: ruiu, labath, csigg, jhenderson.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
sepavloff added a parent revision: D78896: [Support] Add file lock/unlock functions.
Using new methods `lockForUpdate` and `lockTimeout` an instance of
raw_fd_ostream can be put into mode in which it locks underlying file
before each write and unlocks it immediately after. This is convenience
method, it allows transparent operations on log files in parallel builds,
when several processes write into the same file.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78897
Files:
llvm/include/llvm/Support/raw_ostream.h
llvm/lib/Support/raw_ostream.cpp
llvm/unittests/Support/raw_ostream_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78897.260219.patch
Type: text/x-patch
Size: 3579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/a7f12b85/attachment.bin>
More information about the llvm-commits
mailing list