Skip to content

Commit 965c963

Browse files
authored
[Concurrency] Memory order of success must be >= failure path in exchange (swiftlang#63732)
1 parent e898cb7 commit 965c963

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/Concurrency/TaskGroup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1585,7 +1585,7 @@ reevaluate_if_taskgroup_has_results:;
15851585
auto newStatus = TaskGroupStatus{assumedStatus};
15861586
if (status.compare_exchange_strong(
15871587
assumedStatus, newStatus.completingPendingReadyWaiting(this).status,
1588-
/*success*/ std::memory_order_relaxed,
1588+
/*success*/ std::memory_order_release,
15891589
/*failure*/ std::memory_order_acquire)) {
15901590

15911591
// We're going back to running the task, so if we suspended before,

0 commit comments

Comments
 (0)