[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)

John Harrison via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 4 10:32:03 PDT 2025


================
@@ -327,6 +348,23 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name,
       std::unique_lock<std::mutex> lock(dap_sessions_mutex);
       dap_sessions.erase(&loop);
       std::notify_all_at_thread_exit(dap_sessions_condition, std::move(lock));
+
+      if (ttl > 0) {
+        // Start the countdown to kill the server at the end of each connection.
+        std::scoped_lock<std::mutex> lock(ttl_mutex);
+        MainLoopBase::TimePoint future =
----------------
ashgti wrote:

nit: Can we have a more descriptive name than `future`?

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


More information about the lldb-commits mailing list