3 ms·That's easy, just change your program so that every value of type T is now a value of type Arc<Mutex<T>>.by mmirate 9y agoThat's easy, just change your program so that every value of type T is now a value of type Arc<Mutex<T>>.foota 9y agoReference counting does not handle cycles.mmirate 9y agoUse Arc::downgrade() to get a Weak<Mutex<T>> as needed. Weak<U> is like Arc<U> but does not affect the value's reference count.katastic 9y agoBut it works for every other case.