I have to modify the same variable in three different threads. How can I do it since we can only have one muttable reference to a variable?
Thank you for any help guys.
I have to modify the same variable in three different threads. How can I do it since we can only have one muttable reference to a variable?
Thank you for any help guys.
Arc<Mutex<T>>
or Arc<RwLock<T>>
or perhaps atomics.
Reading about it soon. Thank you bro!