3 ms·
Looking at the Person class in the article, which has just a “name” property with String type… I think if you mutate that string from multiple threads — like b
by jmull 5y ago
Looking at the Person class in the article, which has just a “name” property with String type…
I think if you mutate that string from multiple threads — like by appending to it — you would get crashes pretty easily.
I’m really not sure if you would see crashes if you simply access and assign to the name property (rather than mutating the value it is pointing to). I have not seen guarantees on this. Maybe I missed it, but if not, even if it appears to work today, it may not tomorrow.