[llvm] [Support] Join threads when stopping the ThreadPoolExecutor (PR #166054)

Maurice Heumann via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 10 02:30:20 PST 2025


momo5502 wrote:

> Just wanted to ask if this issue is occurring in a current LLVM tool or in some other use case? It would be useful to be able to reproduce the issue. Thanks.

I'm not sure if it happens in any current LLVM tool. For me this only happens when compiling LLVM as a DLL.
Reproducing it is relatively easy, as mentioned here: https://github.com/llvm/llvm-project/pull/166054#issuecomment-3485814704
It just requries compiling LLVM as DLL and scheduling a task on the pool that takes a bit longer. At the end, it's a race condition, so it all depends on if the threads are still alive when the DLL is unloaded.
As mentioned, turning that into a unittest turns out to be really tricky.

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


More information about the llvm-commits mailing list