[html5] r3222 - [e] (0) Vaguely clarify event loop mechanics for web workers.
whatwg at whatwg.org
whatwg at whatwg.org
Thu Jun 11 14:39:56 PDT 2009
Author: ianh
Date: 2009-06-11 14:39:55 -0700 (Thu, 11 Jun 2009)
New Revision: 3222
Modified:
index
source
Log:
[e] (0) Vaguely clarify event loop mechanics for web workers.
Modified: index
===================================================================
--- index 2009-06-11 19:13:41 UTC (rev 3221)
+++ index 2009-06-11 21:39:55 UTC (rev 3222)
@@ -47626,17 +47626,7 @@
manipulation, e.g. when that element is <a href=#insert-an-element-into-a-document title="insert an
element into a document">inserted into the document</a>.</p>
- </dl><p>Each <a href=#concept-task title=concept-task>task</a> is associated with a
- <code>Document</code>; if the task was queued in the context of an
- element, then it is the element's <code>Document</code>; if the task
- was queued in the context of a <a href=#browsing-context>browsing context</a>, then
- it is the <a href=#browsing-context>browsing context</a>'s <a href=#active-document>active
- document</a> at the time the task was queued; if the task was
- queued by or for a <a href=#concept-script title=concept-script>script</a> then
- the document is the <a href="#script's-browsing-context">script's browsing context</a>'s
- <a href=#active-document>active document</a> at the time the task was queued.</p>
-
- <p>When a user agent is to <dfn id=queue-a-task>queue a task</dfn>, it must add the
+ </dl><p>When a user agent is to <dfn id=queue-a-task>queue a task</dfn>, it must add the
given task to one of the <a href=#task-queue title="task queue">task queues</a>
of the relevant <a href=#event-loop>event loop</a>. All the tasks from one
particular <dfn id=task-source>task source</dfn> (e.g. the callbacks generated by
@@ -47654,6 +47644,17 @@
processing events from any one <a href=#task-source>task source</a> out of
order.</p>
+ <p>Each <a href=#concept-task title=concept-task>task</a> that is <a href=#queue-a-task title="queue a task">queued</a> onto a <a href=#task-queue>task queue</a> of
+ an <a href=#event-loop>event loop</a> defined by this specification is
+ associated with a <code>Document</code>; if the task was queued in
+ the context of an element, then it is the element's
+ <code>Document</code>; if the task was queued in the context of a
+ <a href=#browsing-context>browsing context</a>, then it is the <a href=#browsing-context>browsing
+ context</a>'s <a href=#active-document>active document</a> at the time the task
+ was queued; if the task was queued by or for a <a href=#concept-script title=concept-script>script</a> then the document is the
+ <a href="#script's-browsing-context">script's browsing context</a>'s <a href=#active-document>active
+ document</a> at the time the task was queued.</p>
+
<p>A user agent is required to have one <dfn id=storage-mutex>storage
mutex</dfn>. This mutex is used to control access to shared state
like cookies. At any one point, the <a href=#storage-mutex>storage mutex</a> is
@@ -47665,6 +47666,8 @@
a <a href=#concept-script title=concept-script>script</a>, the user agent must
release the <a href=#storage-mutex>storage mutex</a>.</p>
+ <p class=note>Other specifications can define other <a href=#event-loop title="event loop">event loops</a>; in particular, the Web
+ Workers specification does so.</p>
<h5 id=processing-model-2><span class=secno>6.5.4.2 </span>Processing model</h5>
Modified: source
===================================================================
--- source 2009-06-11 19:13:41 UTC (rev 3221)
+++ source 2009-06-11 21:39:55 UTC (rev 3222)
@@ -54270,16 +54270,6 @@
</dl>
- <p>Each <span title="concept-task">task</span> is associated with a
- <code>Document</code>; if the task was queued in the context of an
- element, then it is the element's <code>Document</code>; if the task
- was queued in the context of a <span>browsing context</span>, then
- it is the <span>browsing context</span>'s <span>active
- document</span> at the time the task was queued; if the task was
- queued by or for a <span title="concept-script">script</span> then
- the document is the <span>script's browsing context</span>'s
- <span>active document</span> at the time the task was queued.</p>
-
<p>When a user agent is to <dfn>queue a task</dfn>, it must add the
given task to one of the <span title="task queue">task queues</span>
of the relevant <span>event loop</span>. All the tasks from one
@@ -54299,6 +54289,19 @@
processing events from any one <span>task source</span> out of
order.</p>
+ <p>Each <span title="concept-task">task</span> that is <span
+ title="queue a task">queued</span> onto a <span>task queue</span> of
+ an <span>event loop</span> defined by this specification is
+ associated with a <code>Document</code>; if the task was queued in
+ the context of an element, then it is the element's
+ <code>Document</code>; if the task was queued in the context of a
+ <span>browsing context</span>, then it is the <span>browsing
+ context</span>'s <span>active document</span> at the time the task
+ was queued; if the task was queued by or for a <span
+ title="concept-script">script</span> then the document is the
+ <span>script's browsing context</span>'s <span>active
+ document</span> at the time the task was queued.</p>
+
<p>A user agent is required to have one <dfn>storage
mutex</dfn>. This mutex is used to control access to shared state
like cookies. At any one point, the <span>storage mutex</span> is
@@ -54310,6 +54313,9 @@
a <span title="concept-script">script</span>, the user agent must
release the <span>storage mutex</span>.</p>
+ <p class="note">Other specifications can define other <span
+ title="event loop">event loops</span>; in particular, the Web
+ Workers specification does so.</p>
<h5>Processing model</h5>
@@ -68066,16 +68072,19 @@
</ol>
+
<h4>The event loop</h4>
- <p>Each <code>WorkerGlobalScope</code> object is asssociated with a
- <span>event loop</span>. This <span>event loop</span> has no
- associated <span>browsing context</span>, and its <span title="task
- queue">task queues</span> only have events, callbacks, and
- networking activity as <span title="concept-task">tasks</span>. The
- processing model of these <span title="event loop">event
- loops</span> is defined below in the <span>run a worker</span>
- algorithm.</p>
+ <p>Each <code>WorkerGlobalScope</code> object has an <span>event
+ loop</span> distinct from those defined for <span title="unit of
+ related similar-origin browsing contexts">units of related
+ similar-origin browsing contexts</span>. This <span>event
+ loop</span> has no associated <span>browsing context</span>, and its
+ <span title="task queue">task queues</span> only have events,
+ callbacks, and networking activity as <span
+ title="concept-task">tasks</span>. The processing model of these
+ <span title="event loop">event loops</span> is defined below in the
+ <span>run a worker</span> algorithm.</p>
<p>Each <code>WorkerGlobalScope</code> object also has a <dfn
title="dom-WorkerGlobalScope-closing">closing</dfn> flag, which must
More information about the Commit-Watchers
mailing list