←back to thread

257 points tosh | 1 comments | | HN request time: 0.213s | source
Show context
cperciva ◴[] No.42069585[source]
We use atomic operations to update the pointers in a thread-safe manner

Are you sure about that? Atomics are not locks, and not all systems have strong memory ordering.

replies(3): >>42070126 #>>42070474 #>>42070917 #
1. Sesse__ ◴[] No.42070474[source]
Rust atomics, like C++ atomics, include memory barriers (the programmer chooses how strong, the compiler/CPU is free to give stronger).