[Lldb-commits] [PATCH] D135516: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

Michał Górny via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 17 08:11:21 PDT 2022


mgorny marked an inline comment as done.
mgorny added a comment.

Thanks. I'll do a fresh test run on the updated version and push if it passes.



================
Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:399-402
+  if (m_triggering)
+    return;
+  m_triggering = true;
+
----------------
labath wrote:
> Maybe something like `if (m_triggering.exchange(true)) return;` ?
> This version should work as well, but it may save someone from wondering what will happen if two threads execute this concurrently.
Sure, I'll try that.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135516/new/

https://reviews.llvm.org/D135516



More information about the lldb-commits mailing list