<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
2. We need to synchronize access to mutable state to avoid memory<br>
hazards. This is a separate issue from synchronizing access to<br>
mutable state to avoid correctness issues. With virtual threads on<br>
a single platform thread, this goes away too (because it's always<br>
the same thread observing memory operations; no barriers needed).<br><br></blockquote><div><br></div><div>That still seems incorrect to me (in principle, in practice it most likely will end up to be fine, but I just wouldn't rely on it), because the barrier is needed to prevent instruction reordering by the compiler, and you are not safe from that by using the same platform thread.</div></div></div>