[PATCH] D157459: Make DWARFContext more thread safe.
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 10 21:40:52 PDT 2023
ayermolo added a comment.
In D157459#4573865 <https://reviews.llvm.org/D157459#4573865>, @dblaikie wrote:
> Not sure how I feel about adding multithreading at this level, versus in a wrapper API for those that need it? (insert an interface (`DWARFContext`, then rename the current concrete implementation as `DWARFContextImpl`) then have a `ThreadSafeDWARFContext` that wraps (either as a template, or with a `unique_ptr<DWARFContext>` member) another `DWARFContext` and adds the locking) Though it's probably not the end of the world to add it here directly.
>
> Can probably use Class Template Argument Deduction when locking, like this:
>
> std::unique_lock LockGuard(Mutex);
Is there a downside just adding it here, instead of adding complexity of another class and wrapper APIs?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157459/new/
https://reviews.llvm.org/D157459
More information about the llvm-commits
mailing list