Skip to content

cxx: fix use of condition variable with stop_token

Stephan Lachnit requested to merge p-cxx-fix-hb-manager-cv into main

From discussion in !179 (comment 1050830)

std::stop_token should not be used with std::condition_variable, instead std::condition_variable_any should be used which has wait function that can handle stop tokens. See also https://stackoverflow.com/q/66309276 and https://www.nextptr.com/tutorial/ta1588653702/stdjthread-and-cooperative-cancellation-with-stop-token

Merge request reports