On Monday, 16 January 2017 12:38:01 UTC-5, Francesco Nigro wrote:
>
> I'm missing something for sure, because if it was true, any 
> (single-threaded) "protocol" that rely on the order of writes/loads against 
> (not mapped) ByteBuffers to be fast (ie: sequential writes rocks :P) risks 
> to not see the order respected if not using patterns that force the 
> compiler to block the re-ordering of such instructions (Sci-Fi hypothesis).
>

I don't think you're missing anything.  The JVM would be stupid to reorder 
your sequential writes into random writes, but it's perfectly within its 
right to do so for a single-threaded program according to the JMM, as long 
as it respects data dependencies (AFAIK).  Of course, that would be a huge 
quality of implementation issue, but that's an entirely separate class from 
correctness issues.
 

> with great regards,
> Francesco
>

-- 
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