rt: use release ordering in drop_join_handle_fast (#2044)

Previously acquire operations reading a value written by a successful
CAS in `drop_join_handle_fast` did not synchronize with it. The CAS
wasn't guaranteed to happen before the task deallocation, and so
created a data race between the two.

Use release success ordering to ensure synchronization.
This commit is contained in:
Tomasz Miąsko
2020-01-09 12:06:11 -08:00
committed by Carl Lerche
parent bd28a7a767
commit a7a79f28a8
+1 -1
View File
@@ -266,7 +266,7 @@ impl State {
.compare_exchange_weak(
INITIAL_STATE | JOIN_INTEREST,
INITIAL_STATE,
Relaxed,
Release,
Relaxed,
)
.is_ok()