3 ms·
Related reading: What is RCU, Fundamentally? - https://lwn.net/Articles/262464/ https://lwn.net/Articles/262464/ Amusingly, the first several hits for "Golang
by metadat 2y ago
Related reading:
What is RCU, Fundamentally? - https://lwn.net/Articles/262464/ https://lwn.net/Articles/262464/
Amusingly, the first several hits for "Golang RCU" point to GitHub repos which contain a bunch of Mutexes (locks), import "unsafe", and haven't been updated in 7+ years. Perhaps this is not the most well-understood area of computer science.
Let's face it, when was the last time you needed RCU for a web app?
- yencabulator 2y agoIn a language with GC, RCU is just an thing you can atomically swap to a new version. C is why RCU is complicated. https://pkg.go.dev/sync/atomic#example-Value-Config https://pkg.go.dev/sync/atomic#example-Value-Config
- facturi 2y agoIn GC languages, RCU is just atomic pointer update with immutable data structure. In a language without GC, it requires delayed destruction to avoid memory safety issues. Linux kernel's RCU waits for all CPU cores to context switch and disables preemption when reading RCU data structure. This is not usable in normal application programming.