|
|
|
|
|
by dwohnitmok
1657 days ago
|
|
> If the object is too large you will have contention to the point that you might as well be single threaded. If the object is too small you now have to CAS multiple things which is far from trivial. Right but both of those things are true for locks too right? CAS seems no harder than locks. |
|
Additionally while multiple locks is annoying it is way easier than multiple CAS. "Have a global order for locks" is the hard but solvable problem for multiple locks. For CAS if you need to CAS two dependent things you... I don't know it depends.