koonwen / flat-combiner

Flat combiner written in OCaml
0 stars 0 forks source link

Shouldn't this be a compare and swap? #1

Open kiranandcode opened 2 years ago

kiranandcode commented 2 years ago

https://github.com/koonwen/flat-combiner/blob/4a9a2df618cfcc08880f69a09694c052166a67ba/src/fc_generic/fc_generic_domains.ml#L64

koonwen commented 2 years ago

Yup it should be, thanks for pointing it out! I think I wrote it this way just to keep it simple for the first attempt. I'll change it soon but as of now I don't think it adds very much overhead without CAS.