In Martin Thompson's talks about Aeron he mentions writing threads doing an 
increment on an AtomicLong counter to claim a region in a buffer, but the 
initial 4 bytes  for the length field aren't written, but only on 
completion of the frame, the length is set. This signals to the reader of 
the buffer that this particular write is complete and provides a happens 
before relation.

My question is about this length field; who is responsible for zero'ing it 
out? Once the buffer has been written, the content could be total gibberish 
and if it isn't zero'd, the reading thread could falsely assume it is 
written and boom.. 

-- 
You received this message because you are subscribed to the Google Groups 
"mechanical-sympathy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mechanical-sympathy+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to