CHAPTER 13

image

Web Workers

In Chapter 12, I introduced promises as a way to handle values returned from asynchronous operations. While promises offer a lot of flexibility in how you do async work, I pointed out that asynchronous does not imply multiple threads. JavaScript applications execute in a single-threaded environment. Asynchronous does not mean “do two things at the same time.” Instead, it means “do this thing later, and let me know what happened when it’s done.” That said, applications executing on multiple threads have several advantages, such as taking advantage of multiple processors to perform a task more quickly or to perform some work ...

Get Beginning Windows Store Application Development–HTML and JavaScript Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.