mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-24 00:00:11 +02:00
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:
committed by
Carl Lerche
parent
bd28a7a767
commit
a7a79f28a8
@@ -266,7 +266,7 @@ impl State {
|
||||
.compare_exchange_weak(
|
||||
INITIAL_STATE | JOIN_INTEREST,
|
||||
INITIAL_STATE,
|
||||
Relaxed,
|
||||
Release,
|
||||
Relaxed,
|
||||
)
|
||||
.is_ok()
|
||||
|
||||
Reference in New Issue
Block a user