- From: CVS User ihickson <cvsmail@w3.org>
- Date: Wed, 06 Feb 2013 00:24:07 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/workers In directory roscoe:/tmp/cvs-serv26807 Modified Files: Overview.html Log Message: Integrate the 'event loop' mechanism of workers and windows together, and try to specify which is meant when it might be ambiguous. (whatwg r7696) --- /sources/public/html5/workers/Overview.html 2013/02/05 22:23:55 1.362 +++ /sources/public/html5/workers/Overview.html 2013/02/06 00:24:07 1.363 @@ -216,7 +216,7 @@ <h1>Web Workers</h1> - <h2 class="no-num no-toc" id="editor-s-draft-5-february-2013">Editor's Draft 5 February 2013</h2> + <h2 class="no-num no-toc" id="editor-s-draft-6-february-2013">Editor's Draft 6 February 2013</h2> <dl><dt>Latest Published Version:</dt> <dd><a href="http://www.w3.org/TR/workers/">http://www.w3.org/TR/workers/</a></dd> <dt>Latest Editor's Draft:</dt> @@ -353,7 +353,7 @@ </dl><p>The W3C <a href="http://www.w3.org/2008/webapps/">Web Applications Working Group</a> is the W3C working group responsible for this specification's progress along the W3C Recommendation track. - This specification is the 5 February 2013 Editor's Draft. + This specification is the 6 February 2013 Editor's Draft. </p> @@ -1356,7 +1356,8 @@ (atomically):</p> <ol><li><p>Discard any <span title="concept-task">tasks</span> that have been added to the - <span>event loop</span>'s <span title="task queue">task queues</span>.</p> + <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <span>event loop</span>'s <span title="task queue">task + queues</span>.</p> @@ -1466,13 +1467,11 @@ <h3 id="the-event-loop"><span class="secno">4.3 </span>The event loop</h3> - <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></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 + <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object has a distinct <span>event loop</span>, separate + from those used by <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 - <a href="#run-a-worker">run a worker</a> algorithm.</p> + events, callbacks, and networking activity as <span title="concept-task">tasks</span>. These <span title="event loop">event loops</span> are created by the <a href="#run-a-worker">run a worker</a> algorithm.</p> <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object also has a <dfn id="dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</dfn> flag, which must initially be false, but which can get set to true by the algorithms in the processing model section below.</p> @@ -1493,9 +1492,7 @@ <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> <var title="">worker global scope</var> has a list of <dfn id="the-worker-s-ports">the worker's ports</dfn>, which consists of all the <code><a href="#messageport">MessagePort</a></code> objects that are entangled with another port and that have one (but only one) port owned by <var title="">worker - global scope</var>. This list includes the implicit - <code><a href="#messageport">MessagePort</a></code> in the case of <a href="#dedicatedworkerglobalscope" title="DedicatedWorkerGlobalScope">dedicated - workers</a>.</p> + global scope</var>. This list includes the implicit <code><a href="#messageport">MessagePort</a></code> in the case of <a href="#dedicatedworkerglobalscope" title="DedicatedWorkerGlobalScope">dedicated workers</a>.</p> <p>Each <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> also has a list of <dfn id="the-worker-s-workers">the worker's workers</dfn>. Initially this list is empty; it is populated when the worker creates or obtains further @@ -1657,40 +1654,16 @@ <li> - <p><i title="">Event loop</i>: Wait until either there is a <span title="concept-task">task</span> in one of the <span>event loop</span>'s <span title="task - queue">task queues</span> or <var title="">worker global scope</var>'s <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag is set to true.</p> + <p><i title="">Event loop</i>: Create a new <span>event loop</span>, and run it until it is + destroyed.</p> - </li> - - <li> - - <p>Run the oldest task on one of the <span>event loop</span>'s <span title="task queue">task - queues</span>, if any. The user agent may pick any <span>task queue</span>.</p> - - <p class="note">The handling of events or the execution of callbacks might get prematurely + <p class="note">The handling of events or the execution of callbacks by <span title="concept-task">tasks</span> run by the <span>event loop</span> might get prematurely aborted by the "<a href="#kill-a-worker">kill a worker</a>" or "<a href="#terminate-a-worker">terminate a worker</a>" algorithms defined below.</p> - </li> - - <li> - - <p>If the <span>storage mutex</span> is now owned by the worker's <span>event loop</span>, - release it so that it is once again free.</p> - - </li> - - <li> - - <p>Remove the task just run in the earlier step, if any, from its <span>task queue</span>.</p> - - </li> - - <li> - - <p>If there are any more events in the <span>event loop</span>'s <span title="task queue">task - queues</span> or if <var title="">worker global scope</var>'s <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag is set to false, then jump back to the - step above labeled <i>event loop</i>.</p> + <p class="note">The worker processing model remains on this step until the event loop is + destroyed, which happens after the <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> + flag is set to true, as described in the <span>event loop</span> processing model.</p> </li> @@ -1714,7 +1687,7 @@ - <li><p>If there are any <span title="concept-task">tasks</span> queued in the <span>event + <li><p>If there are any <span title="concept-task">tasks</span> queued in the <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <span>event loop</span>'s <span title="task queue">task queues</span>, discard them without processing them.</li> @@ -1735,7 +1708,7 @@ <ol><li><p>Set the worker's <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <a href="#dom-workerglobalscope-closing" title="dom-WorkerGlobalScope-closing">closing</a> flag to true.</li> - <li><p>If there are any <span title="concept-task">tasks</span> queued in the <span>event + <li><p>If there are any <span title="concept-task">tasks</span> queued in the <code><a href="#workerglobalscope">WorkerGlobalScope</a></code> object's <span>event loop</span>'s <span title="task queue">task queues</span>, discard them without processing them.</li>
Received on Wednesday, 6 February 2013 00:24:11 UTC