3 ms·
I don't understand the reason behind this example? It boils down to "I did a read-modify-write without a lock, now there is a bug". Of course there is! that's
by borland 8y ago
I don't understand the reason behind this example?
It boils down to "I did a read-modify-write without a lock, now there is a bug". Of course there is! that's what locks are for!
The swift value system and copy-on-write do not somehow absolve you from locking.