llvm-project
90138fe4 - [lldb-dap] Only mark disconnecting when we are actually disconnecting (#216356)

Commit
1 day ago
[lldb-dap] Only mark disconnecting when we are actually disconnecting (#216356) Threads ``` TransportHandler | Request Handler | State ===================================================== new request | free | disconnecting = false | | | queue = 1 | disconnect request | handled new request | disconnecting = true | | | queue = 0 ``` In the transport handler we have set m_disconnecting to true. In the window before we push the disconnect request into the queue, the request handler thread finished handling the previous request and is in the while loop. It waits on the m_queue_cv and sees. m_disconnecting = true and queue is empty. DAP shuts down because it assumes there is nothing else to do. The client then times out waiting for the disconnect response. Detach the thread if we cannot join it and let the OS deal with the thread cleanup.
Author
Parents
Loading