Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
BagOfPistchios
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
BagOfPistchios
8y ago
As I understand it, it achives lockfree reads by having two caches: One for modifying and one for reading, and atomically swaps them after modifications (and applies the changes to what was previously the read cache). Am I missing something
2.
▲
by
BagOfPistchios
8y ago
Yes you need both compiler barriers for the ordering, as well as memory fences to ensure the global visibility of previous operations in order. It is possible that the mutex implementation he used does no spinning in case of contention and
3.
▲
by
BagOfPistchios
8y ago
The const keyword really doesn't mean anything. It is not checked at runtime, so a buffer-overrun could change the const member regardless
4.
▲
by
BagOfPistchios
8y ago
That was my point - a lot more people know C
5.
▲
by
BagOfPistchios
8y ago
It may or may not be easier to "maintain and extend" a Rust implementation, but it will surely be even easier to find people to do those things if they keep it in C. EDIT: Rephrased the sentence
6.
▲
by
BagOfPistchios
8y ago
agreed, it is dangeorus if newbies try to use this
7.
▲
by
BagOfPistchios
8y ago
The only times I have ever wanted to freeze an application it was for the purpose of it not hogging CPU time in favor of some interactive program, and had no better way of doing that. On Linux, the Con Kolivas MuQSS CPU scheduler introduces