feat: change schedule_update's Rc to an Arc

BREAKING CHANGE
This commit is contained in:
Ilya Maximov committed 2022-02-23 19:47:17 +01:00
1 parent 03feaa446a
commit bda4a71a72
7 files changed
+19 -19

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ use dioxus_core::{ScopeId, ScopeState};
use std::{
cell::{Cell, Ref, RefCell, RefMut},
collections::HashSet,
rc::Rc,
rc::Rc, sync::Arc,
};
type ProvidedState<T> = RefCell<ProvidedStateInner<T>>;
@@ -10,7 +10,7 @@ type ProvidedState<T> = RefCell<ProvidedStateInner<T>>;
// Tracks all the subscribers to a shared State
pub struct ProvidedStateInner<T> {
value: Rc<RefCell<T>>,
notify_any: Rc<dyn Fn(ScopeId)>,
notify_any: Arc<dyn Fn(ScopeId)>,
consumers: HashSet<ScopeId>,
}