O'Reilly logo

JavaScript Concurrency by Adam Boduch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

The focus of this chapter has been removing obtrusive concurrency semantics from our code. It simply raises the likelihood of our application's success because we'll have code that's easy to maintain and build upon. The first issue that we tackled was writing concurrent code by making everything concurrent. When there's no guesswork involved, our code is consistent and less susceptible to concurrency bugs.

Then, we looked at various approaches we can take to abstract web worker communication. Helper functions are one option and so is extending the postMessage() method. We then addressed some of the limitations of web workers when we need our UI to be responsive. Even though our large dataset is processed faster, we still have the issue ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required