I am having a member of
data_: Arc<Mutex<Data>> to hold some mutable data in a struct. The data_ may be accessed or modified by a number threads.
Later in a function the attempt to obtain a weak pointer using
let mut wd = self.data.downgrade(); results in the following obvious error:
use of unstable library feature 'arc_weak': Weak pointers may not belong in this module.
which complains about using unstable library feature.
I am interested to have the code compile using Beta/Stable version of rust.
Are there any stable alternatives to achieve above? I tried using stabe_rc, which offers stable weak pointer when immutable data is shared using Rc, but I did not find a replacement for Arc there.