Hello! Is `this::field.isInitialized` considered t...
# codereview
e
Hello! Is
this::field.isInitialized
considered thread-safe? (
field
is a
lateinit var
). Trying to figure out if I need to make sure the field gets created from the same thread that it's later accessed from, or if I can just rely on
isInitialized
being thread-safe 😄
e
no, and even if it were, you'd have a TOCTTOU race
c
wait, would you have a TOCTOU? You can't go from initialised to uninitialised can you?
oh, but you can go from uninitialised to initialised doh