On Thu, 14 Dec 2023, Thomas Rodgers wrote: > I need to look at this a bit more (and not on my phone, at lunch). > Ultimately, C++26 expects to add predicate waits and returning a > ‘tri-state’ result isn’t something that’s been considered or likely to be > approved. Ok, then that seems to fit best with my second suggestion: the predicate should only test the value and do nothing else, and actually trying to decrement the semaphore is left up to the caller _M_acquire(), which must then retry __atomic_wait_address if the compare-exchange fails. -- Nate Eldredge nate@thatsmathematics.com