handle virtual dom switching

This commit is contained in:
Evan Almloff committed 2023-08-07 14:59:58 -07:00
1 parent ddbe913e79
commit 6ca170453b
3 files changed
+27 -10

No files matched your search

+2 -1
View File
@@ -1,4 +1,4 @@
use crate::{TaskId, VirtualDom};
use crate::{runtime::RuntimeGuard, TaskId, VirtualDom};
use std::task::Context;
impl VirtualDom {
@@ -7,6 +7,7 @@ impl VirtualDom {
/// This is precise, meaning we won't poll every task, just tasks that have woken up as notified to use by the
/// queue
pub(crate) fn handle_task_wakeup(&mut self, id: TaskId) {
let _runtime = RuntimeGuard::new(self.runtime.clone());
let mut tasks = self.runtime.scheduler.tasks.borrow_mut();
let task = match tasks.get(id.0) {