3 ms·
Can you racily write the same field containing a slice from multiple threads? Unless you have atomic multi-word writes, you could observe tearing and go out of
by titzer 6y ago
Can you racily write the same field containing a slice from multiple threads? Unless you have atomic multi-word writes, you could observe tearing and go out of bounds silently.
One thing that JVM guarantees is that racy programs cannot break the type system. This gets hard when you have multi-word quantities.
- WalterBright 6y ago> Can you You have to use an atomic library function to do it.