News for hackers. Stuff that matters.
Re:Rust in 2018: easier to use by mmirate on Sunday January 14, 2018 @10:07AM (#16144507)
That's easy, just change your program so that every value of type T is now a value of type Arc<Mutex<T>>.
Re:Rust in 2018: easier to use by foota on Sunday January 14, 2018 @04:06PM (#16146444)
Reference counting does not handle cycles.
Re:Rust in 2018: easier to use by mmirate on Sunday January 14, 2018 @05:02PM (#16146759)
Use 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.