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
@@ -1,5 +1,5 @@
use dioxus_core::{ScopeState, TaskId};
use std::{cell::Cell, future::Future, rc::Rc};
use std::{cell::Cell, future::Future, rc::Rc, sync::Arc};
pub fn use_future<'a, T: 'static, F: Future<Output = T> + 'static>(
cx: &'a ScopeState,
@@ -43,7 +43,7 @@ pub fn use_future<'a, T: 'static, F: Future<Output = T> + 'static>(
}
pub struct UseFuture<T> {
update: Rc<dyn Fn()>,
update: Arc<dyn Fn()>,
needs_regen: Cell<bool>,
value: Option<T>,
slot: Rc<Cell<Option<T>>>,