Skip to content

Commit

Permalink
try to fix TSAN error about memory ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
ericniebler committed Dec 31, 2024
1 parent 434e917 commit 8029a5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/stdexec/__detail/__shared.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 8029a5c

Please sign in to comment.