================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to