[Lldb-commits] [lldb] [lldb] Print a message when background tasks take a while to complete (PR #82799)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 23 10:18:16 PST 2024


================
@@ -623,8 +630,20 @@ void Debugger::Terminate() {
   }
 
   if (g_thread_pool) {
-    // The destructor will wait for all the threads to complete.
-    delete g_thread_pool;
+    // Delete the thread pool in a different thread so we can set a timeout.
----------------
clayborg wrote:

Can we create a Progress object here? Maybe something like:
```
Progress progress("Shutting down worker threads");
```
Or is it too late and no one would receive events?

Another option would be to have the thread pool detach from all threads so that we don't need to wait until they complete and just go ahead and exit?

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


More information about the lldb-commits mailing list