ashgti wrote:

> Now if you for example send a breakpoint request.
> 
> It blocks until the default timeout or matches the search predicate ?. 
> Instead of continuously polling on a different thread.

Correct, we do not process any input from lldb-dap until 
`DebugCommunication._recv_packet` is called. That is the function that will 
read 1 packet then process that packet and check the current predicate.

This does change some timings because some requests will trigger events before 
they send a response. So there are cases where we need to check the existing 
state of the debug session instead of waiting for an event.

Previously, we had a mechanism to read messages in 1 thread then set a 
condition variable. In the test thread we would wait for the condition variable 
to be set, then process any messages we had. This lead to the two threads 
having different timing.

With this change, I think things should be more stable because we'll only ever 
read 1 message at a time and we won't be racing the reader thread with the test 
thread.

https://github.com/llvm/llvm-project/pull/165496
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to