Files
CMake/Source/cmWorkerPool.cxx
T
Joerg Sonnenberger 01ad902588 Autogen: Redo locking and state machine for fence handling and the worker pool
(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.
2020-05-21 16:17:36 -04:00

20 KiB