I’ve implemented hazard pointers.
Having done so, the idea that is RCU becomes blindingly obvious. Having seen that, I then finally a day or two ago got round to reading the basic RCU paper, and realised I already knew what it was!
Oddly, though, the RCU paper came out in late 1998, whereas hazard pointers came out in 2004!
So now I’m deciding where to go with this. RCU seems to be a much better choice, but that puzzles me; why would someone go to the trouble of releasing the idea of hazard pointers if RCU really is as much better as it seems?
So I’m going to implement RCU and see how it stacks up.
Actually, first, I’m going to finish the singly-linked list, by which I mean to say get it working, but without SMR – e.g. the unlinked elements are never freed. Then once I’ve chosen an SMR (HP or RCU), I’ll plug that in.
I’ve decided to release a hash in the next release, too, since it’s such a simple thing to do and is very useful.