@@ -89150,13 +89150,22 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89150
89150
<h5 id="event-loop-for-spec-authors">Dealing with the event loop from other specifications</h5>
89151
89151
89152
89152
<p>Writing specifications that correctly interact with the <span>event loop</span> can be tricky.
89153
- This is compounded by how this specification uses a concurrency-model-independent processing
89154
- model, so we say things like "<span>event loop</span>" and "<span>in parallel</span>" instead of
89155
- using more familiar model-specific terms like "main thread" or "on a background thread".</p>
89153
+ This is compounded by how this specification uses concurrency-model-independent terminology, so we
89154
+ say things like "<span>event loop</span>" and "<span>in parallel</span>" instead of using more
89155
+ familiar model-specific terms like "main thread" or "on a background thread".</p>
89156
89156
89157
- <p>The overriding guideline is that any work which would otherwise block the <span>event
89158
- loop</span> must instead be performed <span>in parallel</span> with it. This includes (but is not
89159
- limited to):</p>
89157
+ <p>By default, specification text generally runs on the <span>event loop</span>. This falls out
89158
+ from the formal <a href="#event-loop-processing-model">event loop processing model</a>, in that
89159
+ you can eventually trace most algorithms back to a <span data-x="concept-task">task</span> <span
89160
+ data-x="queue a task">queued</span> there.</p>
89161
+
89162
+ <p class="example">The algorithm steps for any JavaScript method will be invoked by author code
89163
+ calling that method. And author code can only be run via queued tasks, usually originating
89164
+ somewhere in the <a href="script-processing-model"><code>script</code> processing model</a>.</p>
89165
+
89166
+ <p>From this starting point, the overriding guideline is that any work a specification needs to
89167
+ perform that would otherwise block the <span>event loop</span> must instead be performed <span>in
89168
+ parallel</span> with it. This includes (but is not limited to):</p>
89160
89169
89161
89170
<ul>
89162
89171
<li><p>performing heavy computation;</p></li>
@@ -89199,7 +89208,7 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {
89199
89208
89200
89209
<ol>
89201
89210
<li><p>Do any synchronous setup work, while still on the <span>event loop</span>. This may
89202
- include converting <span data-x="JavaScript realm">realm-specific </span> JavaScript values into
89211
+ include converting <span data-x="JavaScript realm">realm</span>-specific JavaScript values into
89203
89212
realm-agnostic specification-level values.</p></li>
89204
89213
89205
89214
<li><p>Perform a set of potentially-expensive steps <span>in parallel</span>, operating entirely on
0 commit comments