rrnewton / haskell-lockfree

A collection of different packages for CAS based data structures.
106 stars 25 forks source link

Implement multi-item CAS (CASN) #65

Open jfischoff opened 7 years ago

jfischoff commented 7 years ago

Multi-item CAS or CASN is the basis for some interesting concurrent data structures. It would be nice if atomic-primops provides a CASN (or perhaps CAS2, CAS3 ... CAS10?).

I took a look A Practical Multi-Word Compare-And-Swap, but I was unable to implement it. Perhaps someone else can ... or maybe there is more modern method?

DreamLinuxer commented 7 years ago

What blocks you from implementing nCAS? Is it come from haskell or something else?

jfischoff commented 7 years ago

My first attempt was to directly transliterate the paper, which involved lots of direct pointer management and was just too difficult for me. I'm trying a second route that is more Haskelly and I'm making progress. I have yet to hit anything that makes it fundamentally impossible with the current interface, but I'm not finished yet.