The race condition made me to revert this change is inside the dwarf
parsing code (and in some other part of LLDB), not in the thread pool
implementation. I run the unit-tests I wrote under TSAN and they all run
cleanly so I don't really expect any race condition coming from that part
of the code.
This is kind of why I pushed back against this in the first place :-/ It's
hard to get right.
I still wish we could find a way to use standard library facilities for
this, either by splitting the compile units into hardware_concurrency
chunks, or kicking off no more than hardware_concurrency comp