Skip to content

Commit

Permalink
Add a warning about the "pause" operation
Browse files Browse the repository at this point in the history
Fixes #1294 by giving implementers license to experiment with alternatives to pausing, and pointing out that this can cause subtle event loop behavior changes, but that's OK.
  • Loading branch information
domenic authored and annevk committed May 23, 2016
1 parent 7707b72 commit 8d564d1
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion source
Original file line number Diff line number Diff line change
Expand Up @@ -87641,7 +87641,7 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {

<p class="note">This causes one of the following algorithms to continue: the <span>event
loop</span>'s main set of steps, the <span>perform a microtask checkpoint</span> algorithm, or
the <span>execute a compound microtask subtask</span> algorithm to continue.</p>
the <span>execute a compound microtask subtask</span> algorithm.</p>

</li>

Expand Down Expand Up @@ -87677,6 +87677,22 @@ dictionary <dfn>PromiseRejectionEventInit</dfn> : <span>EventInit</span> {

</ol>

<div class="warning">
<p><span data-x="pause">Pausing</span> is highly detrimental to the user experience, especially
in scenarios where a single <span>event loop</span> is shared among multiple documents. User
agents are encouraged to experiment with alternatives to <span data-x="pause">pausing</span>,
such as <span data-x="spin the event loop">spinning the event loop</span> or even simply
proceeding without any kind of suspended execution at all, insofar as it is possible to do so
while preserving compatibility with existing content. This specification will happily change if
a less-drastic alternative is discovered to be web-compatible.</p>

<p>In the interim, implementers should be aware that the variety of alternatives that user agents
might experiment with can change subtle aspects of <span>event loop</span> behavior, including
<span data-x="concept-task">task</span> and <span>microtask</span> timing. Implementations should
continue experimenting even if doing so causes them to violate the exact semantics implied by the
<span>pause</span> operation.</p>
</div>

<h5>Generic task sources</h5>

<p>The following <span data-x="task source">task sources</span> are used by a number of mostly
Expand Down

0 comments on commit 8d564d1

Please sign in to comment.