chore: use existing scheduler

This commit is contained in:
Jonathan Kelley committed 2022-12-30 02:39:47 -05:00
1 parent 972084ee32
commit daa5449b6b
6 files changed
+85 -112

No files matched your search

+2 -3
View File
@@ -5,6 +5,7 @@ use crate::ElementId;
use crate::{innerlude::Mutations, Element, ScopeId};
use std::future::Future;
use std::sync::Arc;
use std::task::Waker;
use std::{
cell::{Cell, RefCell},
collections::HashSet,
@@ -37,12 +38,10 @@ impl SuspenseContext {
}
pub(crate) struct SuspenseLeaf {
pub(crate) id: SuspenseId,
pub(crate) scope_id: ScopeId,
pub(crate) tx: futures_channel::mpsc::UnboundedSender<SchedulerMsg>,
pub(crate) notified: Cell<bool>,
pub(crate) task: *mut dyn Future<Output = Element<'static>>,
pub(crate) waker: Arc<SuspenseHandle>,
pub(crate) waker: Waker,
}
pub struct SuspenseHandle {