3 ms·
If one thread tries to mutate the variable a instead of just reading from it, the compiler will output a compile-time error saying you can't do that. (But, if y
by nextaccountic 4y ago
If one thread tries to mutate the variable a instead of just reading from it, the compiler will output a compile-time error saying you can't do that. (But, if you wrap a into a mutex and add the required methods to lock the mutex, you suddenly can)