improve signal copy runtime
This commit is contained in:
1 parent
3d4c5d7c98
commit
04cdb14e5b
14 files changed
+878
-319
No files matched your search
@@ -7,7 +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 mut tasks = self.scheduler.tasks.borrow_mut();
|
||||
let mut tasks = self.runtime.scheduler.tasks.borrow_mut();
|
||||
|
||||
let task = match tasks.get(id.0) {
|
||||
Some(task) => task,
|
||||
@@ -20,8 +20,8 @@ impl VirtualDom {
|
||||
// If the task completes...
|
||||
if task.task.borrow_mut().as_mut().poll(&mut cx).is_ready() {
|
||||
// Remove it from the scope so we dont try to double drop it when the scope dropes
|
||||
let scope = &self.scopes[task.scope.0];
|
||||
scope.spawned_tasks.borrow_mut().remove(&id);
|
||||
let scope = &self.get_scope(task.scope).unwrap();
|
||||
scope.context().spawned_tasks.borrow_mut().remove(&id);
|
||||
|
||||
// Remove it from the scheduler
|
||||
tasks.try_remove(id.0);
|
||||
|
||||
Reference in new issue
Block a user