[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 20 14:29:04 PDT 2025
JDevlieghere wrote:
> My logic behind the `lldb_dap::protocol` types was to keep them as POD data and to not have much (if any) logic in them so that if we need to move the data between threads or queues we can be relatively confident that we're not dealing data races. In swift terms (I'm more familiar with swift than c++), the `lldb_dap::protocol` types would be `struct`'s that are all `Sendable`.
Totally, and I think that's a great design, and not something that would change in my suggestion, right?
> I do like the more simplified `operator()` idea to help deal with the cancelled / interrupted, my existing solution was done to support the LegacyRequestHandlers since they're sending the responses as raw `json::Value`'s still, but with the more unified approach we could handle the cancellation in the `operator()` body.
If we want to support cancellation before moving all the request over to the protocol class, can we *temporarily* store both the JSON and the Protocol in the class we instantiate per request (whether that's the RequestHandler itself, or a class wrapping it) and use whichever one we need for that given request?
https://github.com/llvm/llvm-project/pull/130169
More information about the lldb-commits
mailing list