fix: use arcwake instead of rcwake

This commit is contained in:
Jonathan Kelley committed 2022-12-20 11:13:06 -08:00
1 parent 651ab3e7e3
commit 2fa3fe1fc0
16 files changed
+326 -79

No files matched your search

+4 -4
View File
@@ -8,7 +8,7 @@ mod waker;
pub use suspense::*;
pub use task::*;
pub use waker::RcWake;
pub use waker::ArcWake;
/// The type of message that can be sent to the scheduler.
///
@@ -25,16 +25,16 @@ pub(crate) enum SchedulerMsg {
SuspenseNotified(SuspenseId),
}
use std::{cell::RefCell, rc::Rc};
use std::{cell::RefCell, rc::Rc, sync::Arc};
pub(crate) struct Scheduler {
pub sender: futures_channel::mpsc::UnboundedSender<SchedulerMsg>,
/// Tasks created with cx.spawn
pub tasks: RefCell<Slab<Rc<LocalTask>>>,
pub tasks: RefCell<Slab<Arc<LocalTask>>>,
/// Async components
pub leaves: RefCell<Slab<Rc<SuspenseLeaf>>>,
pub leaves: RefCell<Slab<Arc<SuspenseLeaf>>>,
}
impl Scheduler {