As mentioned in the comments, num_senders is used only for counting purposes, not for synchronizing access to other shared variables. While SeqCst guarantees the correctness of the program, it can also affect the performance. Therefore, using Relaxed is sufficient to maintain the correctness of the program without affecting its efficiency.
https://github.com/rust-lang/futures-rs/blob/aafe554b02cbac19d396512b36bce8b688a18115/futures-channel/src/mpsc/mod.rs#L283
As mentioned in the comments,
num_senders
is used only for counting purposes, not for synchronizing access to other shared variables. While SeqCst guarantees the correctness of the program, it can also affect the performance. Therefore, using Relaxed is sufficient to maintain the correctness of the program without affecting its efficiency.https://github.com/rust-lang/futures-rs/commit/ed3b268225c7c532a4b222adfe077c4e8ce0f24d Could you please explain the reasoning behind the need to switch to seqcst?