* Use DynamicLatch in DispatchQueue to avoid main thread spinning
Replace the busy-yielding pending_task_count_ loop in DispatchQueue::finishTasks
with a blocking DynamicLatch. This avoids having the main thread consume CPU
cycles while waiting for dispatched tasks to complete.
The DynamicLatch implementation uses C++20 std::atomic::wait/notify_all for
efficient blocking and wakeup, with proper release-acquire semantics to ensure
task results are visible to the waiting thread.
* Reformat DynamicLatch to match DispatchQueue style
* Update attribution headers in DispatchQueue files to note modifications
I'm looking to try to have unified thread pool with OpenSTA and OpenROAD
and having this method would make it easier to understand how much
parallelism is available in the pool.
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>