37 if (_state->cancelled.load(std::memory_order_acquire)) {
40 const std::lock_guard lock(_state->mutex);
41 if (_state->cancelled.exchange(
true, std::memory_order_acq_rel)) {
44 for (
const auto* callback : _state->callbacks) {
47 _state->callbacks.clear();