* 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 |
||
|---|---|---|
| .. | ||
| sta | ||