HTML and CSS Reference
In-Depth Information
Other Uses
Crunching prime numbers may not be the best real-world example of using thread
pooling, but you can use the same technique for processing image data. For more in‐
formation, see http://www.smartjava.org/examples/webworkers2 and Figure 9-3 .
Figure 9-3. Example of Web Worker threads processing image data
Web Workers could be put into action within your app for additional scenarios as well.
For example, you could parse wiki text as the user types, and then generate the HTML.
You can find an example of this at http://www.cach.me/blog/2011/01/javascript-web-
workers-tutorial-parse-wiki-text-in-real-time . Or, you could use it for visualizations and
business graphs. For a visualization framework, see https://github.com/samizdatco/
arbor .
 
Search WWH ::




Custom Search