[Lldb-commits] [lldb] [lldb][plugin] Clear in same thread as set (PR #139252)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon May 12 03:45:42 PDT 2025
https://github.com/labath requested changes to this pull request.
This defeats the purpose of storing the sentinel object -- the goal was to clear it only after performing all the indexing.
I think the ScopedExtractDIEs object needs to be implemented differently. It uses the RWMutex as a counter of active object instances, which is... cute... but not really necessary. Instead of the RW mutex, it could count the number of instances directly (in an integer variable) and then clean up when the count goes to zero. The variable could be protected by a (regular) mutex, and this would only need to be locked while manipulating the variable, so it will always be unlocked/locked on the same thread.
https://github.com/llvm/llvm-project/pull/139252
More information about the lldb-commits
mailing list