From 90e1a6547c64b0c0bb8d19ec3df27bac2d341f63 Mon Sep 17 00:00:00 2001 From: Michal Mocny Date: Thu, 25 Apr 2024 09:02:17 -0400 Subject: [PATCH 1/2] Trivial readability changes to scheduling-tasks doc --- spec/scheduling-tasks.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/scheduling-tasks.md b/spec/scheduling-tasks.md index 7a7ec89..4edb338 100644 --- a/spec/scheduling-tasks.md +++ b/spec/scheduling-tasks.md @@ -17,8 +17,8 @@ used for tasks that are blocking the user's ability to interact with the page, s core experience or responding to user input. user-visible is the second highest priority, and is meant to -be used for tasks that visible to the user but not necessarily blocking user actions, such as -rendering secondary parts of the page. This is the default priority. +be used for tasks that are observable to the user but not necessarily blocking user actions, such as +updating secondary parts of the page. This is the default priority. background is the lowest priority, and is meant to be used for tasks that are not time-critical, such as background log processing or initializing certain @@ -110,7 +110,7 @@ Note: We implement *dynamic prioritization* by enqueuing tasks associated with a response to `prioritychange` events. The [=Scheduler/dynamic priority task queue map=] holds the [=scheduler task queues=] whose priorities can change, and the map key is the {{TaskSignal}} which all tasks in the queue are associated with. -

+

The values of the [=Scheduler/static priority task queue map=] are [=scheduler task queues=] whose priorities do not change. Tasks with *static priorities* — those that were scheduled with an explicit {{SchedulerPostTaskOptions/priority}} option or a {{SchedulerPostTaskOptions/signal}} @@ -148,7 +148,7 @@ A scheduler task is a [=/task=] with an additional numeric The following [=task sources=] are defined as scheduler task sources, and must only be used for [=scheduler tasks=]. -: The posted task task source +: The posted task's task source :: This [=task source=] is used for tasks scheduled through {{Scheduler/postTask()}}.
@@ -274,7 +274,7 @@ Issue: [=Run steps after a timeout=] doesn't necessarily account for suspension; 1. Let |enqueue order| be |scheduler|'s [=Scheduler/next enqueue order=]. 1. Increment |scheduler|'s [=Scheduler/next enqueue order=] by 1. 1. Let |task| be the result of [=queuing a scheduler task=] on |queue| given |enqueue order|, - [=the posted task task source=], and |document|, and that performs the following steps: + [=the posted task's task source=], and |document|, and that performs the following steps: 1. Let |callback result| be the result of [=invoking=] |callback|. If that threw an exception, then [=reject=] |result| with that, otherwise resolve |result| with |callback result|. 1. If |signal| is not null, then [=AbortSignal/add|add the following=] abort steps to it: From 88ee673be7c0bc9c9e83f24c9cf771534f159933 Mon Sep 17 00:00:00 2001 From: Michal Mocny Date: Thu, 25 Apr 2024 17:39:27 +0000 Subject: [PATCH 2/2] address comments --- spec/scheduling-tasks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/scheduling-tasks.md b/spec/scheduling-tasks.md index 4edb338..a3a2df8 100644 --- a/spec/scheduling-tasks.md +++ b/spec/scheduling-tasks.md @@ -148,7 +148,7 @@ A scheduler task is a [=/task=] with an additional numeric The following [=task sources=] are defined as scheduler task sources, and must only be used for [=scheduler tasks=]. -: The posted task's task source +: The posted task task source :: This [=task source=] is used for tasks scheduled through {{Scheduler/postTask()}}.
@@ -274,7 +274,7 @@ Issue: [=Run steps after a timeout=] doesn't necessarily account for suspension; 1. Let |enqueue order| be |scheduler|'s [=Scheduler/next enqueue order=]. 1. Increment |scheduler|'s [=Scheduler/next enqueue order=] by 1. 1. Let |task| be the result of [=queuing a scheduler task=] on |queue| given |enqueue order|, - [=the posted task's task source=], and |document|, and that performs the following steps: + the [=posted task task source=], and |document|, and that performs the following steps: 1. Let |callback result| be the result of [=invoking=] |callback|. If that threw an exception, then [=reject=] |result| with that, otherwise resolve |result| with |callback result|. 1. If |signal| is not null, then [=AbortSignal/add|add the following=] abort steps to it: