Commit Graph

5 Commits

Author SHA1 Message Date
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
James Cherry 21848bcdd2 clang tidy
Signed-off-by: James Cherry <cherry@parallaxsw.com>
2026-04-15 09:38:10 -07:00
James Cherry 63efee64bf tidy round1 2026-04-13 14:59:05 -07:00
Ethan Mahintorabi 7ac4a47db1
util: Add method to get thread count from dispatch queue (#324)
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>
2025-12-12 15:49:22 -08:00
James Cherry ee326f165c public headers in include/sta 2020-04-05 14:53:44 -07:00