Sketch, I hope it's right, but it seems quite simple."This way when a consumer 
is reading an entry it can verify that the sequence number in the header entry 
did not change between  reading it initially and when it's ready to ack it by 
incrementing the consumer sequence."This is really all you need for SPSC, but 
there's no ACK since the producer doesn't care, assuming consumer has a side 
buffer large enough to copy into, and assuming some framing in the entry 
header:handleNextEntry(EntryHandler eh);Entry e = next;long id = e.id; <- an 
acquire loadint length = e.length;... copy data into consumer buffer ...if (id 
= e.id) <- an acquire load  ... detect gap, you can load the producer index 
...else  ... next is length bytes down the buffer ...  eh.hadle(...)
You can implement with/without letting data wrap around the buffer

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Scalable Synchronization Algorithms" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to lock-free+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/lock-free/42205404.1054877.1486627144448%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to