feat: change schedule_update's Rc to an Arc
BREAKING CHANGE
This commit is contained in:
7 files changed
+19
-19
No files matched your search
@@ -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>,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user