[Lldb-commits] [lldb] [lldb] Update JSONTransport to use MainLoop for reading. (PR #148300)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 14 01:28:02 PDT 2025


================
@@ -22,8 +23,28 @@ class TransportBase : public PipePairTest {
 protected:
   std::unique_ptr<lldb_dap::Transport> to_dap;
   std::unique_ptr<lldb_dap::Transport> from_dap;
+  lldb_private::MainLoop loop;
 
   void SetUp() override;
+
+  template <typename P>
+  void
+  RunOnce(std::function<void(llvm::Expected<P>)> callback,
+          std::chrono::milliseconds timeout = std::chrono::milliseconds(100)) {
----------------
labath wrote:

I'd make this 1 second. 100ms seems like it could cause false positives on loaded machines. We're only going to wait the full interval in case of an error anyway.

https://github.com/llvm/llvm-project/pull/148300


More information about the lldb-commits mailing list