[common] use libc++ provided jthread instead of in-house one (which deadlocks on FBSD 14) #351

Merged
MaranBr merged 4 commits from liz-use-libcpp-jthread into master 2025-10-01 06:59:36 +02:00
Showing only changes of commit 9afce1b6d7 - Show all commits

View file

@ -102,7 +102,11 @@ public:
T PopWait(std::stop_token stop_token) {
if (Empty()) {
std::unique_lock lock{cv_mutex};
cv.wait(lock, stop_token, [this] { return !Empty(); });
if constexpr (with_stop_token) {
cv.wait(lock, stop_token, [this] { return !Empty(); });
} else {
cv.wait(lock, [this] { return !Empty(); });
}
}
if (stop_token.stop_requested()) {
return T{};