3 ms·
Right, but you can implement atomic state transitions quite naturally with CAS.
by twoodfin 9y ago
Right, but you can implement atomic state transitions quite naturally with CAS.
- eternalban 9y agoI suggest you actually listen to Cliff explain why he did what he did before you belabor the obvious. (Those state transitios are all CASed ..)
- twoodfin 9y agoI have no idea what you think we’re disagreeing about. I’ve watched Cliff’s presentation a handful of times over the past decade and implemented something similar (albeit simpler) myself. Yes, the particular FSM in his hash table is interesting and novel, but just as insightful to me was his argument that data structures implemented as state machines built on atomic CAS can save you much of the trouble of proving you’ve put memory barriers in the right places. “All” you have to do is demonstrate that every possible state is valid.