[Lldb-commits] [PATCH] D135516: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 17 06:54:40 PDT 2022
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:399-402
+ if (m_triggering)
+ return;
+ m_triggering = true;
+
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135516/new/
https://reviews.llvm.org/D135516
More information about the lldb-commits
mailing list