mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 06:47:08 -05:00
01ad902588
(1) All CV use must hold the corresponding mutex, otherwise race conditions happen. This is mandated by the C++ standard. (2) Introduce a separate CV for the thread waiting for other jobs to finish before running a fence. This avoids waking up all other workers blindly. Correctly wake that thread up when the processing of outstanding jobs is done. (3) Split the waiting for a fence to become runnable from a fence is pending. This avoids problems if more than one fence can end up on the queue. The thread that took a fence off the queue is responsible for clearing the fence processing flag.
20 KiB
20 KiB