poll tasks in the same order they are queued (#2273)
This commit is contained in:
1 parent
26c109f661
commit
a012fb57ab
2 files changed
+9
-8
No files matched your search
@@ -518,7 +518,7 @@ impl VirtualDom {
|
||||
while let Some(task) = self.pop_task() {
|
||||
// Then poll any tasks that might be pending
|
||||
let mut tasks = task.tasks_queued.into_inner();
|
||||
while let Some(task) = tasks.pop() {
|
||||
while let Some(task) = tasks.pop_front() {
|
||||
let _ = self.runtime.handle_task_wakeup(task);
|
||||
|
||||
// Running that task, may mark a scope higher up as dirty. If it does, return from the function early
|
||||
@@ -702,7 +702,7 @@ impl VirtualDom {
|
||||
while let Some(task) = self.pop_task() {
|
||||
// Then poll any tasks that might be pending
|
||||
let mut tasks = task.tasks_queued.into_inner();
|
||||
while let Some(task) = tasks.pop() {
|
||||
while let Some(task) = tasks.pop_front() {
|
||||
if self.runtime.task_runs_during_suspense(task) {
|
||||
let _ = self.runtime.handle_task_wakeup(task);
|
||||
// Running that task, may mark a scope higher up as dirty. If it does, return from the function early
|
||||
|
||||
Reference in new issue
Block a user