jasonmolenda added inline comments.
================ Comment at: lldb/tools/debugserver/source/RNBRemote.cpp:780 PThreadMutex::Locker locker(m_mutex); if (m_rx_packets.empty()) { ---------------- JDevlieghere wrote: > This is an RAII object, right? Can we just block scope it? Right now it looks > like we might not unlock if we return early on line 787. I agree with the suggested change. But yeah I think putting the part of this method that touches m_rx_packets in a block, and holding the lock in that block, would be best, make it a little clearer. As for the early return on 787, won't locker release the lock in its dtor? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158035/new/ https://reviews.llvm.org/D158035 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits