summaryrefslogtreecommitdiff
path: root/doc/concepts/expressions.md
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-26 17:47:49 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-04-29 10:56:41 +0200
commit5ab67696cc314dc9ca463114ecee826bcafbe9e7 (patch)
treeee8ed9c35701543c5a50192378f4cd97a8179b27 /doc/concepts/expressions.md
parente736991eea0b5a1080281bd00e8267d1b97ff212 (diff)
downloadjustbuild-5ab67696cc314dc9ca463114ecee826bcafbe9e7.tar.gz
Fix race condition in task queue
To avoid lock contention, our task system queues tasks in several queues. In order to know when there is no more work to be done, a global counter keeps track of the total work. Here, it is important that this counter be incremented before a value is added to the queue, for otherwise some other thread could pick it up and decrement the total work load, hence getting us in a state where the counter underestimates the total amount of work to be done. Fix the order of those operations.
Diffstat (limited to 'doc/concepts/expressions.md')
0 files changed, 0 insertions, 0 deletions