Skip to content

Commit

Permalink
[e] (0) postprocessor update
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3336 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 29, 2009
1 parent 5ed9b80 commit 553044f
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions source
Expand Up @@ -66764,7 +66764,7 @@ XXX Once we resolve the style="" issue, address these:

<p>The main page is as follows:</p>

<pre>EXAMPLE primes/page.html</pre>
<pre>EXAMPLE workers/primes/page.html</pre>

<p>The <code title="dom-Worker">Worker()</code> constructor call
creates a worker and returns a <code>Worker</code> object
Expand All @@ -66775,7 +66775,7 @@ XXX Once we resolve the style="" issue, address these:

<p>The worker itself is as follows:</p>

<pre>EXAMPLE primes/worker.js</pre>
<pre>EXAMPLE workers/primes/worker.js</pre>

<p>The bulk of this code is simply an unoptimized search for a prime
number. To send a message back to the page, the <code
Expand Down Expand Up @@ -66804,7 +66804,7 @@ XXX Once we resolve the style="" issue, address these:

<p>The worker itself is as follows:</p>

<pre>EXAMPLE database-updater/worker.js</pre>
<pre>EXAMPLE workers/database-updater/worker.js</pre>

<p>This connects to the server using the <code>WebSocket</code>
mechanism and opens the local database (which, we presume, has been
Expand All @@ -66830,20 +66830,20 @@ XXX Once we resolve the style="" issue, address these:

<p>The main page is as follows:</p>

<pre>EXAMPLE stocks/page.html</pre>
<pre>EXAMPLE workers/stocks/page.html</pre>

<p>The two workers use a common library for performing the actual
network calls. This library is as follows:</p>

<pre>EXAMPLE stocks/io.js</pre>
<pre>EXAMPLE workers/stocks/io.js</pre>

<p>The stock updater worker is as follows:</p>

<pre>EXAMPLE stocks/ticker.js</pre>
<pre>EXAMPLE workers/stocks/ticker.js</pre>

<p>The search query worker is as follows:</p>

<pre>EXAMPLE stocks/searcher.js</pre>
<pre>EXAMPLE workers/stocks/searcher.js</pre>

<p><a href="http://www.whatwg.org/demos/workers/stocks/page.html">View this example online</a>.</p>

Expand All @@ -66861,11 +66861,11 @@ XXX Once we resolve the style="" issue, address these:
<p>The main page isn't interesting, it merely provides a way to open
the viewers:</p>

<pre>EXAMPLE multiviewer/page.html</pre>
<pre>EXAMPLE workers/multiviewer/page.html</pre>

<p>The viewer is more involved:</p>

<pre>EXAMPLE multiviewer/viewer.html</pre>
<pre>EXAMPLE workers/multiviewer/viewer.html</pre>

<p>There are several key things worth noting about the way the
viewer is written.</p>
Expand All @@ -66886,7 +66886,7 @@ XXX Once we resolve the style="" issue, address these:

<p>Finally, the worker:</p>

<pre>EXAMPLE multiviewer/worker.js</pre>
<pre>EXAMPLE workers/multiviewer/worker.js</pre>

<p><strong>Connecting to multiple pages</strong>. The script uses
the <code
Expand Down Expand Up @@ -66914,18 +66914,18 @@ XXX Once we resolve the style="" issue, address these:

<p>The main page is as follows, it just reports the result:</p>

<pre>EXAMPLE primes/page.html</pre>
<pre>EXAMPLE workers/primes/page.html</pre>

<p>The worker itself is as follows:</p>

<pre>EXAMPLE multicore/worker.js</pre>
<pre>EXAMPLE workers/multicore/worker.js</pre>

<p>It consists of a loop to start the subworkers, and then a handler
that waits for all the subworkers to respond.</p>

<p>The subworkers are implemented as follows:</p>

<pre>EXAMPLE multicore/core.js</pre>
<pre>EXAMPLE workers/multicore/core.js</pre>

<p>They receive two numbers in two events, perform the computation
for the range of numbers thus specified, and then report the result
Expand Down Expand Up @@ -66968,33 +66968,33 @@ XXX Once we resolve the style="" issue, address these:

<p>The library itself is as follows:</p>

<pre>EXAMPLE crypto/libcrypto-v1.js</pre>
<pre>EXAMPLE workers/crypto/libcrypto-v1.js</pre>

<p>Note that the crypto functions here are just stubs and don't do
real cryptography.</p>

<p>This library could be used as follows:</p>

<pre>EXAMPLE crypto/page.html</pre>
<pre>EXAMPLE workers/crypto/page.html</pre>

<p>A later version of the API, though, might want to offload all the
crypto work onto subworkers. This could be done as follows:</p>

<pre>EXAMPLE crypto/libcrypto-v2.js</pre>
<pre>EXAMPLE workers/crypto/libcrypto-v2.js</pre>

<p>The little subworkers would then be as follows.</p>

<p>For generating key pairs:</p>

<pre>EXAMPLE crypto/libcrypto-v2-generator.js</pre>
<pre>EXAMPLE workers/crypto/libcrypto-v2-generator.js</pre>

<p>For encrypting:</p>

<pre>EXAMPLE crypto/libcrypto-v2-encryptor.js</pre>
<pre>EXAMPLE workers/crypto/libcrypto-v2-encryptor.js</pre>

<p>For decrypting:</p>

<pre>EXAMPLE crypto/libcrypto-v2-decryptor.js</pre>
<pre>EXAMPLE workers/crypto/libcrypto-v2-decryptor.js</pre>

<p>Notice how the users of the API don't have to even know that this
is happening &mdash; the API hasn't changed; the library can
Expand Down

0 comments on commit 553044f

Please sign in to comment.