←back to thread

362 points tosh | 1 comments | | HN request time: 0s | 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(4): >>42070126 #>>42070474 #>>42070917 #>>42076779 #
1. CyberDildonics ◴[] No.42076779[source]
A huge part of atomic operations in programming languages and modern CPUs (meaning in the last few decades) is updating pointers in a thread safe manner.

Why would think you need locks?