3 ms·
res = last.nextDone.compareAndSet( (null,false), (myNode, false)) I fail to see how under contention the statement above is "wait-free". Having globalPhase is
by xxs 10y ago
res = last.nextDone.compareAndSet( (null,false), (myNode, false))
I fail to see how under contention the statement above is "wait-free".
Having globalPhase is another contention point (although atomic adds are wait free on most hardware, nowadays).
Not ceratain if 'tid' is threadId but having AtomicReferenceArray (all notation appears to stem from java.util.concurrent) with an arbitrary length is certainly not a wait-free operation, hence the announce would fail to be wait free. Using CPU-id instead is a hard one as well unless all threads are core-bound. Morealso if the array (announce) is not fixed length the entire algorithm cannot finish in finite amount of steps.