Browse Source

reuse remove_task in handle_task_wakeup

Evan Almloff 1 năm trước cách đây
mục cha
commit
e72bf5820f
1 tập tin đã thay đổi với 1 bổ sung5 xóa
  1. 1 5
      packages/core/src/tasks.rs

+ 1 - 5
packages/core/src/tasks.rs

@@ -171,11 +171,7 @@ impl Runtime {
                 .borrow_mut()
                 .remove(&id);
 
-            // Remove it from the scheduler
-            self.tasks.borrow_mut().try_remove(id.0);
-
-            // Remove it from the suspended tasks
-            self.suspended_tasks.borrow_mut().remove(&id);
+            self.remove_task(id);
         }
 
         // Remove the scope from the stack