OpenSTA/include
Drew Lewis b3458485ba
Dont spin main for queue (#443)
* 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
2026-06-06 16:45:46 -07:00
..
sta Dont spin main for queue (#443) 2026-06-06 16:45:46 -07:00