summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-12-05 22:03:51 +0100
committerSven Gothel <[email protected]>2021-12-05 22:03:51 +0100
commit4d67b951ef9a119c1610c4faf1b9ab9c79a69167 (patch)
treeff6b5a2c5de44fcc01d9b7459e1d7b301302673b /README.md
parentbc725a14656be03cd68c771e519ed54dde4f62ee (diff)
jau::latch: Using condition_variable requires us to hold same mutex lock on modifying count_down() and synchronizing wait*()
Using condition_variable requires us to hold same mutex lock on modifying count_down() and synchronizing wait*(). This is required to not slip the modification of shared variable in count_down() while synchronizing in wait(). This fixed bug lead to sporadic maximum timouts within latch::wait_for(..), even though the condition has been reached beforehand, incl. notification. Notable: The mutex lock shall only be held during modification and the corresponding condition_variable wait-loop. The notify*() still shall be issued w/o lock, i.e. out of mutex scope, to avoid inefficient double-lock at wait*().
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions