hundreds-breakfast-49010
11/11/2019, 11:04 PMMutex
?aloof-angle-91616
11/11/2019, 11:04 PMhundreds-breakfast-49010
11/11/2019, 11:05 PMArc<Mutex<T>>
and T
has some function &self -> foo
on it, can I easily get a Arc<Mutex<foo>>
?aloof-angle-91616
11/11/2019, 11:05 PMaloof-angle-91616
11/11/2019, 11:07 PMArc
, since you can't stick it in the same spot as the old onealoof-angle-91616
11/11/2019, 11:07 PMMutex<>
too, since mutexes are paired with types in rust, so i was going to look through the constructors for Mutexaloof-angle-91616
11/11/2019, 11:08 PMArc<Mutex<T>>
at the same time?hundreds-breakfast-49010
11/11/2019, 11:08 PMhundreds-breakfast-49010
11/11/2019, 11:08 PMArc<Mutex<_>>
in WorkUnitStore
more complicatedhundreds-breakfast-49010
11/11/2019, 11:09 PMget_workunits
hundreds-breakfast-49010
11/11/2019, 11:09 PMaloof-angle-91616
11/11/2019, 11:09 PMArc::new(Mutex::new(self.get_foo())
would make sense, but not sure if you can construct a mutex like thataloof-angle-91616
11/11/2019, 11:10 PMaloof-angle-91616
11/11/2019, 11:12 PMhundreds-breakfast-49010
11/11/2019, 11:15 PMhundreds-breakfast-49010
11/11/2019, 11:15 PM