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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.