[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 31 10:30:55 PDT 2025
================
@@ -397,6 +402,23 @@ struct DAP {
InstructionBreakpoint *GetInstructionBreakpoint(const lldb::break_id_t bp_id);
InstructionBreakpoint *GetInstructionBPFromStopReason(lldb::SBThread &thread);
+
+ /// Checks if the request is cancelled.
+ bool IsCancelled(const protocol::Request &);
+
+ /// Clears the cancel request from the set of tracked cancel requests.
+ void ClearCancelRequest(const protocol::CancelArguments &);
+
+private:
+ std::mutex m_queue_mutex;
+ std::deque<protocol::Message> m_queue;
+ std::condition_variable m_queue_cv;
+
+ std::mutex m_cancelled_requests_mutex;
+ std::set<int64_t> m_cancelled_requests;
----------------
JDevlieghere wrote:
```suggestion
llvm::SmallSet<int64_t, 4> m_cancelled_requests;
```
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list