From 8029a5cc0ac42159d8b15eb17b9fae32fdfe41e1 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Mon, 30 Dec 2024 18:10:53 -0800 Subject: [PATCH] try to fix TSAN error about memory ordering --- include/stdexec/__detail/__shared.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/stdexec/__detail/__shared.hpp b/include/stdexec/__detail/__shared.hpp index 74f453c8f..320c4e37c 100644 --- a/include/stdexec/__detail/__shared.hpp +++ b/include/stdexec/__detail/__shared.hpp @@ -268,7 +268,7 @@ namespace stdexec { } void __detach() noexcept { - if (__ref_count_.load(std::memory_order_acq_rel) < 4ul) { + if (__ref_count_.load() < 4ul) { // We are the final "consumer", and we are about to release our reference // to the shared state. Ask the operation to stop early. __stop_source_.request_stop();