@koakuma without memory linear in the number of threads that could be involved?
@robryk I have no idea about memory requirements
@koakuma Actually, I think one can do with just one shared "buffer", at least in the world where you can fit a counter of operations in half of the CAS word -- while filling the buffer, which is composed of <prev version, word> pairs, you CAS its elements so that you start failing if there was an intervening update.
@koakuma thanks for an interesting problem to think about, which I hopefully will over the next week or so
@koakuma btw an interesting special case is when this cas will never see conflicting updates (only possibly updates that have already been applied in the past). This special case is way simpler, but still has the counter overflow problem
@robryk Another thing that I'd like to know is how easy it is to conjure up a lockfree DWCAS out of singleword ones
With the constraint that allocating one time during thread startup is an acceptable thing but having to allocate in the middle of a thread run is a no-no...
@koakuma in all of these cases: how fine are you with lock-free unless scheduler has been extremely unfair (in which case it may block)?
@robryk Ideally I'd want something close to a native DWCAS (which I don't think have any fairness guarantee either?)
@robryk Though this is more of a curiosity thing don't take it too seriously lole
@robryk I wonder if a 2x32b CAS has enough space for the counter...