Replies: 1 comment 1 reply
-
Unsynchronized loads are more relaxed than relaxed loads. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
https://github.com/tokio-rs/tokio/blob/6fcd9c02176bf3cd570bc7de88edaa3b95ea480a/tokio/src/runtime/scheduler/multi_thread/queue.rs#L149C49-L149C56
i think you are missed while look at golang imlementaton
because golang have not such memory model like C++ or Rust
https://github.com/golang/go/blob/07fc59199b9522bfe0d14f35c4391394efc336c9/src/runtime/proc.go#L6571
all unsync_load can be just atomic Relaxed access
you can simplify check this by godbolt for golang and Rust or C++
few access for week memory cpu like mips or powerpc
spmc seems require cache pad for prevent false sharing and impove perfomance
Beta Was this translation helpful? Give feedback.
All reactions