How it works...

We've seen in previous chapters how flexible composing promises and async functions can be. Doing so with workers is a natural extension. Consider an asynchronous AJAX request. This could be thought of as taking place in a worker. After all, it is being performed in a different thread of execution, but managed by the browser.

As long as success error conditions are handled properly, promises and async functions can be used to provide familiar interfaces to Web Workers. Having familiar and simple interfaces is crucial when integrating new technology with an existing code base.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.128.189.98