Clarification: I don't think this can malfunction even if writing the bool
is
not atomic, since 1) one thread writes it and one thread reads it 2) the
bool
only goes from false to true and never back, so even if the reader thread
reads
it between the non-atomic write (when the bool contains several bytes: when
some
of the bytes have been written and some not), it'll get whatever value, but
it
will get the correct value when it reads it the next time.
IOW, it's a bit sloppy but I guess it should work? LGTM?
https://codereview.chromium.org/616263003/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.